Sitelet https://github.com/zigpy/zigpy-xbee/pull/166
Skip to content

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

Merged
puddly merged 2 commits into
zigpy:devfrom
Shulyaka:energy_scan_legacy
Nov 20, 2023
Merged

puddly merged 2 commits into
zigpy:devfrom
Shulyaka:energy_scan_legacy

Conversation

@Shulyaka

@Shulyaka Shulyaka commented Nov 1, 2023

Copy link
Copy Markdown
Contributor

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

puddly commented Nov 2, 2023

Copy link
Copy Markdown
Contributor

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

@codecov

codecov Bot commented Nov 2, 2023 •

Copy link
Copy Markdown

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

Shulyaka commented Nov 2, 2023

Copy link
Copy Markdown
Contributor Author

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

Shulyaka commented Nov 3, 2023

Copy link
Copy Markdown
Contributor Author

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

@Shulyaka Shulyaka closed this Nov 3, 2023
@Shulyaka

Shulyaka commented Nov 5, 2023

Copy link
Copy Markdown
Contributor Author

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

@Shulyaka

Shulyaka commented Nov 6, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor Author

Done, updated and rebased.

@puddly
puddly merged commit 846130e into zigpy:dev Nov 20, 2023
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