finity69x2 / nws_alerts

An updated version of the nws_alerts custom integration for Home Assistant
86 stars 29 forks source link

Include 'ends' data with each event #92

Closed GreyBandit closed 2 weeks ago

GreyBandit commented 3 weeks ago

Each event from the NWS includes an 'ends' string that differs from the 'expires' string. While 'expires' seems intuitive, it actually isn't what the NWS uses as the public end time of events (at least, not always). It would be helpful to include that data in the integration.

Example

My area has an Excessive Heat Warning running from 1pm to 8pm on Aug 26, as seen here by the local NWS office website. image

And here is the data from the NWS API (full data file linked below): image NWSAlertData.txt

Notice how the 'ends' and 'expires' time are different. The 'expires' time is 5:45am Aug 26, while the 'ends' time is 8pm Aug 26. 8pm makes a lot more sense and is the time used and advertised by the NWS. It would really nice to have that string available in the Home Assistant integration.

jhemak commented 3 weeks ago

Yes please! I made a similar comment in #67. Thank you!

BTW, from what I have observed, ends is the better value to use for the end time of an alert; and when it's blank/missing, then it's best to use expires.

finity69x2 commented 3 weeks ago

@GreyBandit and @jhemak (or anyone who comes around later...)

see the official NWS Alerts thread on the HA forum for further discussion on this issue:

https://community.home-assistant.io/t/severe-weather-alerts-from-the-us-national-weather-service/71853/596

finity69x2 commented 2 weeks ago

added in latest release

jhemak commented 2 weeks ago

Thank you!!