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

Integration should throw HomeAssistantError #224

Open
miqm opened this issue Feb 3, 2024 · 0 comments
Open

Integration should throw HomeAssistantError #224

miqm opened this issue Feb 3, 2024 · 0 comments

Comments

@miqm
Copy link

miqm commented Feb 3, 2024

Hello,

Problem
I use this integration with home assistant automations to trun on and off batteries or charge them over night. However sometimes changing mode fails to run due to communication error (either caused by transient network error or some other causes - it doesn't matter). In automation i made steps to continue on error and wrapped with repeat-until loop to ensure proper state is set. However automation still breaks as continue_on_error functionality ignores only HomeAssistantError type, while this automation throws Modbus Error.

Expectation

I'd like that this automation throw HomeAssistantError on error rather than raw exceptions so continue_on_error could be used.

See here:
https://github.com/home-assistant/core/blob/ba8a530d19dc3e93602275961de46d700611f4a1/homeassistant/helpers/script.py#L493

https://community.home-assistant.io/t/continue-on-error-not-working/429947/6

@miqm miqm changed the title Integration should throw HomeAssistantException Integration should throw HomeAssistantError Feb 3, 2024
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

No branches or pull requests

1 participant