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

Fix going unavailable #298

Merged
merged 1 commit into from
Aug 2, 2024
Merged

Conversation

functionpointer
Copy link
Contributor

Fixes #293

After investigating, i think the problem isn't really the TIMEOUT nor SCAN_INTERVAL, as this is something HAs built-in DataUpdateCoordinator should handle.

Instead, the problem is error management. We do get an error, but we ignore it!
Instead, we rely on controller._state, but this doesn't get cleared when an error occurs.

This PR fixes the problem by propagating the error if we get one.

@functionpointer
Copy link
Contributor Author

The black formatter seems to be outdated, as my local version (24.4.2), formats slightly differently.

@vinteo
Copy link
Owner

vinteo commented Aug 2, 2024

Thanks for this

I updated the linter can you please rebase with master

Turns out controller._state does not always get cleared
when a connection error occurs.

However, we do get an error. So we should use it!
Copy link

sonarcloud bot commented Aug 2, 2024

@vinteo vinteo merged commit 6a5928a into vinteo:master Aug 2, 2024
6 checks passed
@vinteo
Copy link
Owner

vinteo commented Aug 2, 2024

Thank you

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.

Incorrect unavailable handling
2 participants