Closed Shulyaka closed 10 months ago
Thanks! It would be nice to use a more specific exception than RuntimeError
to deal with unknown commands.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
626bce6
) 100.00% compared to head (0b0abbf
) 100.00%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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.
Superseded by #168. The command is supported. This PR is not needed.
Once #169 is merged, I will update this PR to use a more specific exception.
Done, updated and rebased.
Fixes https://github.com/home-assistant/core/issues/103208
If we receive the
RuntimeError
exeption onED
command, return zero energy scanning results instead of raising the exception.