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

Handle Grocy not ready/running with ConfigEntryNotReady #296

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TomBrien
Copy link

@TomBrien TomBrien commented Dec 6, 2023

Raise approriate Exceptions for Home Assistant to know to retry when Grocy is not running or ready.

I've observed two cases:

  1. Connection error, this can happen when there is no response, either due to some connection issue or (more likely) after a HAOS update and if the nginx reverse proxy addon is being used to handle SSL for grocy and hasn't started up yet and/or local DNS (again running under HAOS) hasn't started up after an update (this is when I first spotted the issue).
  2. Invlaid/empty response, pygrocy doesn't check the content is present before trying to decode the json so we see JSONDecodeError at our end. This happens if the addon is not running.

@TomBrien
Copy link
Author

TomBrien commented Dec 6, 2023

I didn't see #295 before making this. This slightly extends that PR by covering the second case too

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.

None yet

1 participant