Severe Weather Alerts from the US National Weather Service

The API endpoints are still listed here: API Web Service

I have no idea where this .atom stuff has come from.

Edit:
Looks like the ATOM stuff is for CAP software, the JSON endpoints aren’t going anywhere unless the gov’t gets rid of NOAA all together.

1 Like

It’s in the description of this fine project on github:

thanks

1 Like

Why yes it is.

I’m not sure when it changed or if it ever worked but I’ve now fixed it by just adding “.yaml” to the end of the link. I kinda suck that this documentation thing… :wink:

thanks for letting me know.

Got some time to update my card and thanks to those who showed me where I was off. It works again!!

I have a question though. Does the fuzzy time come from the NWS? Different API?
Old Headline gave the exact time the warning was issued and the time (and day) it expires.
Like:

Red Flag Warning issued August 16 at 1:37PM PDT until August 17 at 11:00PM PDT by NWS Reno NV

The new one says from this day morning until that day night.
Like:

BEACH HAZARDS STATEMENT IN EFFECT FROM SUNDAY MORNING THROUGH LATE MONDAY NIGHT

I very much preferred the precision of the old way and am curious if there is something I can do to get it back.

Thanks again for all your hard work on this.

There should be no difference at all between the data that was in the old and new versions of the integration.

literally the only difference is how the alert attributes are organized.

if the format of the messages are different then that is almost certainly the NWS. But without a live example it’s hard to absolutely know for sure what you are looking at.

I can grab the data from old and new. I haven’t yet updated my production system, but have on a test system.
-----------------EDIT------------------
I posted an issue on github with more details. I hope that is enough to fully show what I’m seeing, but if not let me know what else you may need.

Thanks

I think I’d rather give the support here rather than on github if you don’t mind. It’s harder for me to work in the issues section than here…

I see that you are referencing a “sensor.nws_alert_event” and the attributes you list as seeing looks like just a raw printout of the actual returned values from the NWS API itself. that is totally different than the way the attributes of the integration looked.

But then in referencing the new integration the sensor is called “sensor.nws_alerts” as expected for the default config of the integration.

the old version of the integration attributes looked something like this:

con: mdi:alert
friendly_name: NWS Alerts CA
attribution: Data provided by Weather.gov
title: Flash Flood Warning - Flood Warning - Excessive Heat Warning
event_id: https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.062adf8f774208d4b0301b8ac64107167c49c6a8.001.1 - https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.2a856572766cc0bbdf80ffb871408eaf287d1e46.001.1 - https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.cf5b013516d8b5a423702d735823505819207f26.001.2
message_type: Update - Alert - Alert
event_status: Actual - Actual - Actual
event_severity: Severe - Severe - Severe
event_onset: 2024-08-17T08:47:00-05:00 - 2024-08-17T08:01:00-05:00 - 2024-08-17T12:00:00-05:00
event_expires: 2024-08-17T11:00:00-05:00 - 2024-08-17T11:00:00-05:00 - 2024-08-17T15:15:00-05:00
display_desc: 
>
Headline: Flash Flood Warning
Status: Actual
Message Type: Update
Severity: Severe
Certainty: Likely
Onset: 2024-08-17T08:47:00-05:00
Expires: 2024-08-17T11:00:00-05:00
Description: FFWTSA

The National Weather Service in Tulsa has extended the

* Flash Flood Warning for...
Southwestern Sebastian County in west central Arkansas...
East Central Haskell County in southeastern Oklahoma...
Central Le Flore County in southeastern Oklahoma...

* Until 1100 AM CDT.

* At 847 AM CDT, Doppler radar indicated thunderstorms producing
heavy rain across the warned area. Between 2 and 4 inches of rain
have fallen. Additional rainfall amounts up to 2 inches are
possible in the warned area. Flash flooding is ongoing or expected
to begin shortly.

HAZARD...Flash flooding caused by thunderstorms.

SOURCE...Radar.

IMPACT...Flash flooding of small creeks and streams, urban
areas, highways, streets and underpasses as well as
other poor drainage and low-lying areas.

* Some locations that will experience flash flooding include...
Poteau...                          Pocola...
Heavener...                        Spiro...
Panama...                          Wister...
Hackett...                         Howe...
Hartford...                        Huntington...
Keota...                           Bokoshe...
Midland...                         Cameron...
Lake Wister State Park...          Shady Point...
Rock Island...                     Patterson...
Cowlington...                      Scullyville...
Instruction: Turn around, don't drown when encountering flooded roads. Most flood
deaths occur in vehicles.

-


>
Headline: FLOOD WARNING IN EFFECT UNTIL 11 AM CDT THIS MORNING
Status: Actual
Message Type: Alert
Severity: Severe
Certainty: Likely
Onset: 2024-08-17T08:01:00-05:00
Expires: 2024-08-17T11:00:00-05:00
Description: * WHAT...Flooding caused by excessive rainfall is expected.

* WHERE...Portions of Arkansas, including the following counties,
Crawford and Sebastian and Oklahoma, including the following
counties, Le Flore and Sequoyah.

* WHEN...Until 1100 AM CDT.

* IMPACTS...Flooding of rivers, creeks, streams, and other low-lying
and flood-prone locations is imminent or occurring. It will take
several hours for all the water from these storms to work through
local drainage systems in urban areas.

* ADDITIONAL DETAILS...
- At 800 AM CDT, Flooding is ongoing due to earlier
thunderstorms. Additional lighter showers and thunderstorm
will move through the warned area through the morning.
Between 2 and 5 inches of rain have fallen.
- Additional rainfall amounts up to 0.5 inches are possible in
the warned area.
- Some locations that will experience flooding include...
Fort Smith...                      Van Buren...
Sallisaw...                        Pocola...
Muldrow...                         Roland...
Arkoma...                          Hackett...
Bonanza...                         Gans...
Moffett...                         Fort Smith Regional
Airport...
Cottonwood...                      Braden...
Scullyville...                     Mill Creek...
Dora...                            Rye Hill...
- http://www.weather.gov/safety/flood
Instruction: Turn around, don't drown when encountering flooded roads. Most flood
deaths occur in vehicles.

-


>
Headline: EXCESSIVE HEAT WARNING IN EFFECT FROM NOON TODAY TO 9 PM CDT THIS EVENING
Status: Actual
Message Type: Alert
Severity: Severe
Certainty: Likely
Onset: 2024-08-17T12:00:00-05:00
Expires: 2024-08-17T15:15:00-05:00
Description: * WHAT...Dangerously hot conditions with heat index values 110 to
115 degrees expected this afternoon.

* WHERE...In Arkansas, Crawford, Franklin, and Sebastian Counties.
In Oklahoma, Sequoyah, Craig, Nowata, and Washington OK Counties.

* WHEN...From noon today to 9 PM CDT this evening.

* IMPACTS...The combination of hot temperatures and high humidity
will create a dangerous situation in which heat related illnesses
are more likely.
Instruction: An Excessive Heat Warning means conditions will accelerate the onset
of heat related illness, which may result in a shorter response time
to potential heat exhaustion and heat stroke.

To reduce risk during outdoor work, the Occupational Safety and
Health Administration recommends scheduling frequent rest breaks in
shaded or air conditioned environments. Anyone overcome by heat
should be moved to a cool and shaded location. Heat stroke is an
emergency! Call 9 1 1.
spoken_desc: Flash Flood Warning

-

FLOOD WARNING IN EFFECT UNTIL 11 AM CDT THIS MORNING

-

EXCESSIVE HEAT WARNING IN EFFECT FROM NOON TODAY TO 9 PM CDT THIS EVENING

again the attributes you posted on github are in a completely different format than the example I posted.

and as you can see in my example the “Headline:” attribute is in the same format as the current integration.

What I think is happening is that you are mistaking a different sensor (one that retrieves the raw data directly from the NWS API) for the old integrations sensor.

in the old package I think I put a raw API data sensor in there for comparison when I switched from the curl command_line to the integration many years ago and I think you may be seeing that old sensor thinking it’s the old integration sensor.

FWIW, you can still use that old sensor format and get the same data as you did before.

But the old integration and the new integration provide the same data.

does that make sense?

Well, hehe kinda. Here vs. github is fine. Thanks for responding!

I think I follow you and yes the entities are different so that sensor.nws_alert_event must have been a thing from before recent times. So as long as that keeps working I guess I can just leave it alone, but I’d rather not just forget it and move on because I know it’ll catch up with me at some point.
So… the link you posted a few days ago talking about the new endpoint for getting alerts. Is this what you are using now?
https://api.weather.gov/alerts/active.atom?zone=CAC057
If you go to that link (right now anyway) go about 19 lines down you find this:

<title>Lake Wind Advisory issued August 17 at 1:00AM PDT until August 17 at 8:00PM PDT by NWS Reno NV</title>

Which is what I’m used to seeing.
I am no coder, but what it looks like your custom component is looking for is:

 <valueName>NWSheadline</valueName>
            <value>LAKE WIND ADVISORY REMAINS IN EFFECT FROM 11 AM THIS MORNING TO 8 PM PDT THIS EVENING</value>

based on:

I have no idea how, but would it be possible for you to add the title to the attributes? Would that make it something one could then display?

Thanks

No. it still uses the same endpoint as the old one. that was just put out there as a “huh, isn’t that interesting” kind of thing.

it has no bearing at all on either the old or new integration version.

yes but it’s an “or” situation.

If the “NWSHeadline” exists then use that otherwise use the event as the “Headline”. it never has used the “headline” data for anything.

since that endpoint isn’t being used in the integration then there is no “title” to pull in. But it’s the same information as the “headline” in the regular json endpoint.

I’m really not inclined to change the Headline attribute to “headline” instead of “parameters/NWSHeadline” since that would be another potential breaking change for other users. And I already got enough flack for this one so I would rather not make another one right away…or ever again… :laughing:

But I guess if enough people asked for it to be changed then I wouldn’t necessarily be totally opposed to it…I guess…

time for you to start campaigning for the change if you want it that bad. :wink:

Hi:
First, excuse me, maybe this is a newbie question. I’m having an issue with the expiration information in version 5.0. I can’t access the correct expiration time for the alerts.

version 5

Alerts:
  - Event: Heat Advisory
    ID: e05cdec0-4659-e575-5d9b-a1bcbc10aa35
    URL: >-
      https://api.weather.gov/alerts/urn:oid:2.49.0.1.840.0.9f5563addac4312016ce83e0c0f8fbf464832b80.001.1
    Headline: HEAT ADVISORY IN EFFECT FROM 10 AM THIS MORNING TO 5 PM AST THIS AFTERNOON
    Type: Alert
    Status: Actual
    Severity: Moderate
    Certainty: Likely
    Sent: "2024-08-18T03:36:00-04:00"
    Onset: "2024-08-18T10:00:00-04:00"
    Expires: "2024-08-18T11:45:00-04:00". #<<<<<<<<<<<<
    Description: |-
      * WHAT...A period of dangerously hot and humid conditions are
      expected. This level of heat affects most individual sensitive to
      heat. expected.

      * WHERE...All coastal and low-elevated areas in Puerto Rico, and
      across the Virgin Islands.

      * WHEN...From 10 AM this morning to 5 PM AST this afternoon.

      * IMPACTS...Hot temperatures and high humidity 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.
icon: mdi:alert
friendly_name: NWS Alerts

Version 4

alerts:

area: >-
San Juan and Vicinity; Northeast; Southeast; North Central; Ponce and
Vicinity; Northwest; Mayaguez and Vicinity; Southwest; St.Thomas...St.
John.. and Adjacent Islands; St Croix
certainty: Likely
description: |-
WHAT...A period of dangerously hot and humid conditions are
expected. This level of heat affects most individual sensitive to
heat. expected.

WHERE...All coastal and low-elevated areas in Puerto Rico, and
across the Virgin Islands.

WHEN...From 10 AM this morning to 5 PM AST this afternoon.

IMPACTS...Hot temperatures and high humidity may cause heat
illnesses.
ends: '2024-08-18T17:00:00-04:00' #<<<<<<<<<<<<
event: Heat Advisory
instruction: |-
Drink plenty of fluids, stay in an air-conditioned room, stay out of
the sun, and check up on relatives and neighbors.
response: Execute
sent: '2024-08-18T03:36:00-04:00'
severity: Moderate
title: Heat Advisory issued August 18 at 3:36AM AST until August 18 at 5:00PM AST
urgency: Expected
NWSheadline:

HEAT ADVISORY IN EFFECT FROM 10 AM THIS MORNING TO 5 PM AST THIS AFTERNOON
hailSize: 'null'
windGust: 'null'
waterspoutDetection: 'null'
effective: '2024-08-18T03:36:00-04:00'
expires: '2024-08-18T11:45:00-04:00' #<<<<<<<<<<<<
endsExpires: '2024-08-18T17:00:00-04:00' #<<<<<<<<<<<<<<<<<<<<<<<

In version 5 the expiration it is supposed to be 5:00pm as in version 4 or endsExpires isnt available in v5.
Any help we bill appreciated.

I saw your github issue on this too so I’ll answer it here…

I don’t think that the “version 4” you were using was my version 4 of the integration.

the reason I say this is because there are several extra pieces of data that I’ve never had in the integration.

things like “area”, “response”, “hailSize”, “windGust” and (the one you’re asking about) “endsExpires” don’t exist in my version 4 or in any other version at all.

maybe you downloaded someone elses fork of my repo?

Oops, I need to find out where I got that integration from because I really don’t remember. Even in version 5 it doesn’t let me know when an event ends correctly and it’s necessary for the card in the dashboard. Thanks for the good work.

1 Like

what card is this?

It sounds like the card you are using is another different card than the one from my repo as well.

Since my integration never provided the data then there’s no reason my card would have used it.

@finity just wanted to say nice job on this integration. For me it’s one of my favorites and most useful.

2 Likes

Thanks for the kind words.

I’m really glad I can help others be just a bit more safe.

2 Likes

Oh and of course don’t forget to also thank @firstof9 since he’s been doing most of the heavy lifting on the code recently.

(and thanks for reminding me to post this with your :heart: @firstof9 :grinning_face_with_smiling_eyes: )

2 Likes

I help when I can :slight_smile: :beers:

1 Like

Definitely! Thank you @firstof9 as well!

1 Like

First, thank you thank you thank you @finity and @firstof9 for this great rewrite and integration. Absolutely love it. I’m working through setting up for Alexa announcements and am wondering if there is a way to search the alerts for the words “watch” or “warning” instead of maintaining a test list?