Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fail on energy scan with legacy modules #166

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

Shulyaka
Copy link
Contributor

@Shulyaka Shulyaka commented Nov 1, 2023

Fixes home-assistant/core#103208

If we receive the RuntimeError exeption on ED command, return zero energy scanning results instead of raising the exception.

@puddly
Copy link
Contributor

puddly commented Nov 2, 2023

Thanks! It would be nice to use a more specific exception than RuntimeError to deal with unknown commands.

Copy link

codecov bot commented Nov 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (626bce6) 100.00% compared to head (0b0abbf) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##               dev      #166   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          780       784    +4     
=========================================
+ Hits           780       784    +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Shulyaka Shulyaka marked this pull request as draft November 2, 2023 23:31
@Shulyaka
Copy link
Contributor Author

Shulyaka commented Nov 2, 2023

It would be nice to use a more specific exception than RuntimeError to deal with unknown commands.

While checking your suggestion, I have noticed that the actual error is slightly different, it's not an unknown command but invalid parameter.
I will need some more time to double check the solution.

@Shulyaka Shulyaka mentioned this pull request Nov 3, 2023
@Shulyaka
Copy link
Contributor Author

Shulyaka commented Nov 3, 2023

Superseded by #168. The command is supported. This PR is not needed.

@Shulyaka Shulyaka closed this Nov 3, 2023
@Shulyaka
Copy link
Contributor Author

Shulyaka commented Nov 5, 2023

Reopen for home-assistant/core#103208 (comment)

@Shulyaka
Copy link
Contributor Author

Shulyaka commented Nov 6, 2023

Once #169 is merged, I will update this PR to use a more specific exception.

@Shulyaka Shulyaka marked this pull request as ready for review November 6, 2023 09:24
@Shulyaka
Copy link
Contributor Author

Done, updated and rebased.

@puddly puddly merged commit 846130e into zigpy:dev Nov 20, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ZHA] Zigbee fails to set up after 2023.11.0 upgrade
2 participants