sensor last_updated always unknown
V 6.1 Sensor updates, but last_updated never changes from unknown
2025-06-07 22:37:43.127 DEBUG (MainThread) [custom_components.nws_alerts] getting state for NCZ001 from https://api.weather.gov/alerts/active/count 2025-06-07 22:37:43.277 DEBUG (MainThread) [custom_components.nws_alerts] Data: {'state': 0, 'event': None, 'event_id': None, 'message_type': None, 'event_status': None, 'event_severity': None, 'event_sent': None, 'event_onset': None, 'event_expires': None, 'event_ends': None, 'areas_affected': None, 'display_desc': None, 'spoken_desc': None} 2025-06-07 22:37:43.278 DEBUG (MainThread) [custom_components.nws_alerts] Finished fetching NWS Alerts data in 0.151 seconds (success: True)
I just installed this integration and facing same issue, following.
reviewing on the api active count url 'https://api.weather.gov/alerts/active/count' NCZ001 is not listed, nor is my county code. I had this set up and it was working, but now I have the same issue as well of 'unknown'. I have active alerts for my county from the NWS, but the api.weather.gov url doesn't list my county with active alerts.
So I was doing a little testing on this because we just had a storm come through.
I am also seeing 0 for the count and last updated as 'unknown'.
However, i added a code of a place next to me that has weather alert counts and it showed the count correctly and the last updated started working.
I removed the county setting back my normal list where no one had an alert and the count went back to 0 and the last updated went back to 'unknown'. So it seems like the last updated is only working if a count greater than 0 comes back for one of the configured counties.
This should be fixed now in the latest release.