-
Notifications
You must be signed in to change notification settings - Fork 30
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
API Errors Cause Integration State To Bounce Frequently #70
Comments
With the proposed change in place, the The change I am proposing is to essentially cancel the entity's update in the case of this specific error, as if the fetch attempt had never happened. The entity's history: The error log:
|
It appears that there was a PR to address this several years ago as #7, but those changes have been lost along the way. |
I came across this error today ... was the fix ever merged? |
Errors returned from the NWS API cause the integration state to become "unavailable" until the next successful data fetch. At a poll frequency of one minute, this intermittent behavior can happen frequently.
The logged error is:
The data returned from the NWS API is something like:
If this happens when no alerts are active it is hardly noticed. However, if an alert is active, any templates looking for a state (count) of ">0" will no longer evaluate to True. In my case, this sets my
alert
entity back toidle
, causing automations to declare the alert "expired", only to declare a "new" alert a minute later when the API again responds with good data. When notifications are issued each time this happens, especially in the middle of the night, it can be extremely annoying.I will propose a potential solution for this by way of a PR. If anyone has a workaround for this problem I would love to hear it.
The text was updated successfully, but these errors were encountered: