nws_alerts icon indicating copy to clipboard operation
nws_alerts copied to clipboard

sensor last_updated always unknown

Open semisynthetic opened this issue 7 months ago • 4 comments

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)

Image

semisynthetic avatar Jun 08 '25 02:06 semisynthetic

I just installed this integration and facing same issue, following.

Ali229 avatar Jun 18 '25 13:06 Ali229

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.

The24KFool avatar Jun 18 '25 22:06 The24KFool

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.

nmcbride avatar Jun 30 '25 01:06 nmcbride

This should be fixed now in the latest release.

firstof9 avatar Nov 04 '25 16:11 firstof9