Severe Weather Alerts from the US National Weather Service

Just a heads up for users of my NWS Alerts integration…

I don’t know if anyone here knows just how much I hate breaking changes (except one of you :wink:) but at some point to improve things those breaking changes are necessary. I’ve really resisted it but I think it’s now at that point.

The alerts attributes have been a mess since the beginning of this integration. Don’t get me wrong, the integration has worked fairly well over the many years it’s been around. But I have to admit that the way the alerts are organized leave a lot to be desired.

So that will soon be changing.

The integration will substantially work exactly the same way it has been functionality-wise. All of the same data will be available but it will just be organized differently.

All of the alerts will be in a list with each alert list item containing a dictionary of all the alert data

here is an example from my test install to show you the new layout of alert attributes:

attribution: Data provided by Weather.gov
Alerts: 
- Event: Excessive Heat Warning
  ID: 54fe074c-e94f-1b02-44d9-420b89b4e491
  URL: >-
    https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.049a16ccd015f19aff9308e2e48a1761bd1a7d1b.003.1
  Headline: EXCESSIVE HEAT WARNING REMAINS IN EFFECT UNTIL 8 PM PDT FRIDAY
  Type: Update
  Status: Actual
  Severity: Severe
  Certainty: Likely
  Onset: '2024-07-25T02:48:00-07:00'
  Expires: '2024-07-25T15:30:00-07:00'
  Description: |-
    * WHAT...Dangerously hot conditions with temperatures up to 114
    expected.

    * WHERE...San Gorgonio Pass Near Banning.

    * WHEN...Until 8 PM PDT Friday.

    * IMPACTS...Heat related illnesses increase significantly during
    extreme heat events.
  Instruction: |-
    Drink plenty of fluids, stay in an air-conditioned room, stay out of
    the sun, and check up on relatives and neighbors.
- Event: Heat Advisory
  ID: b4720aeb-1fbf-e089-8d29-7b5c3bb9d8ce
  URL: >-
    https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.049a16ccd015f19aff9308e2e48a1761bd1a7d1b.006.1
  Headline: HEAT ADVISORY REMAINS IN EFFECT UNTIL 10 PM PDT THIS EVENING
  Type: Update
  Status: Actual
  Severity: Moderate
  Certainty: Likely
  Onset: '2024-07-25T02:48:00-07:00'
  Expires: '2024-07-25T15:30:00-07:00'
  Description: |-
    * WHAT...High temperatures in the 90s to 102 below 5000 feet
    expected.

    * WHERE...Riverside County Mountains and San Bernardino County
    Mountains.

    * WHEN...Until 10 PM PDT this evening.

    * IMPACTS...Hot temperatures may cause heat illnesses.
  Instruction: |-
    Drink plenty of fluids, stay in an air-conditioned room, stay out of
    the sun, and check up on relatives and neighbors.

I think we can all agree that the new layout will be WAY more readable and all the data will be more accessible via templates than using a whole bunch of splits/etc the way it is now.

OTOH, the package (sensors, automations, scripts, etc) will need a major rewrite as well. And that’s what I want to get ironed out before releasing the updated integration into the wild.

But if anyone wants to try it out you can find it in the dev branch of my github.

Anyone that does try it out let me know if you like or dislike the new changes and if you have any suggestions either way.

And also be aware that, as can be seen in the example above, I’ve removed the “spoken_desc” data from alert attributes since all it was was just a copy of the headline anyway. And the headline data is still included.

And again thanks immensely to @firstof9 to do the heavy-lifting on finalizing the new changes. I couldn’t have done it without them.

2 Likes