custom-components / weatheralerts

A sensor that gives you weather alerts from alerts.weather.gov.
MIT License
125 stars 15 forks source link

"Entity Not Available" #31

Closed jcqrs closed 4 years ago

jcqrs commented 4 years ago

I've checked the error log but I haven't seen anything related to this. I've already done the whole shebang (cleared cache, uninstalled/reinstalled component. etc). STill shows "not available."

I'm using the latest version of HACS and this component. Home Assistant ver. 103.5

GP920 commented 4 years ago

My entity is also currently unavailable, and I see a timeout error in the logs. 0.105.1 here.

ntilley905 commented 4 years ago

The NWS API has been having some serious uptime issues today, I'd imagine the timeouts are related.

jcqrs commented 4 years ago

The sensor is visible of late, but now I'm getting the following error: "Could not update the sensor (ContentTypeError)"

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jlverhagen commented 4 years ago

This should be fixed now, with the addition of PlatformNotReady. The weather.gov site very frequently is either slow to respond or returns various errors which will result in errors initializing the platform and updating the sensor after it is initialized. These errors aren't necessarily an indication of a total platform crash or failure, just an indication in the log that the platform didn't succeed doing what is was suppose to do at that particular time.

If it fails during initialization (during Home Assistant startup), the platform will continue to retry the initialization. After initialization, if the sensor fails to update, it will keep trying every 30 seconds (or scan_interval setting if configured).

If the problems persist with this new version of weatheralerts, open a new issue and I will investigate further.