grocy
grocy copied to clipboard
Handle Grocy not ready/running with ConfigEntryNotReady
Raise approriate Exceptions for Home Assistant to know to retry when Grocy is not running or ready.
I've observed two cases:
- 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).
- Invlaid/empty response, pygrocy doesn't check the content is present before trying to decode the json so we see
JSONDecodeErrorat our end. This happens if the addon is not running.
I didn't see #295 before making this. This slightly extends that PR by covering the second case too