Severe Weather Alerts from the US National Weather Service

I would completely agree if it weren’t for my awkward geographic area/NWS zone. Last year, I set up a TTS notification, and the darn thing kept going off for severe weather 20 miles away, heading in the wrong direction. I’m in Colorado, and severe thunderstorms (and tornado) warnings are a frequent occurrence in the summer.

If I could get the geographic point validation, I would probably take a two-step approach to the alerting. For example, a text message for tornado/severe storm warnings in the area (within my zone) vs. TTS alerting for warnings validated over my location.

In any case, I get this isn’t an easy thing to solve and I appreciate all of the work on the integration! Thanks for the discussion around this idea!

2 Likes

I really think you might benefit from using the NWS API as a REST sensor outside of the integration and then using the method I posted about above to get a reasonably close polygon

It’s not a perfect solution but it will get you closer to what you are after than what the integration can provide.

Technically it would be possible to add the geo-location polygon data as attributes to the integration but I also hesitate to do that as well because the sensor will become so laden with info it becomes way more cumbersome to read the data provided.

And you can literally get all the data you want by just setting up the API REST sensor which is what I used to use before the integration was made. Once you make the REST call you have everything you need to create any other sensor you want from it.

OH, and you can use both if you want to try it out before removing the integration. I still use the REST sensor right now to get additional data if someone has a question about the integration. So both will happily co-exist.

1 Like

Thanks, finity- I’ll play around with the REST sensor.

If I could ask for a quick clarification based on your earlier comment:

If the point /alerts/active/ API only returns active alerts for the specified location, wouldn’t that give more specificity over the larger zone-based API query? The point API seems to provide the accuracy I am trying to achieve without dealing with the polygon analysis. Am I missing something?

I honestly don’t know. It’s possible. the only thing you can do is try it and see.

I’ll try to get some time to play with it myself and see what I can find out too.

EDIT:

I did just try it and it does seem to be more precise than the general warning areas.

So it should work out better for you using the point precise location. That’s good to know.

But I think I would still better be more bugged than less bugged for severe weather alerts.

1 Like

And as another FYI I’ve decided I’m going to look into making a separate integration that will allow someone in your situation to use the precise GPS coordinates of your location instead of the zones.

I’m going to make it a more “advanced” type of install method (yaml only) since there will need to be a disclaimer that it may miss some general alerts that the zone type alerts will provide. I’m not really sure what kind of lead time you would get by using the precise location for truly severe weather.

I’ve already started on it so I’ll let you know when it’s ready to be tested.

4 Likes

I would look at the NWS website first; the results are per region. They are not reported via LAT/LONG but by codes used by NWS. Some do overlap thou.

The API provides both FIPS (geocode regions) and polygon (LAT/LON) events. See what was discussed about 10 days prior Severe Weather Alerts from the US National Weather Service - #389 by squirtbrnr

1 Like

@Bryan_Fleming

I think I’ve got it working or at least it seems to work in my tests.

you can try it from the github repo and let me know how it works.

4 Likes

I have attempted to manually install this and unfortunately there are issues with the init.py and not loading correctly.

OK, thanks.

I’ll double check it.

Sorry about that I forgot to upload a file from my test platform.

I just installed it from scratch on my production platform and it worked.

try to re-download it and try again, please.

What steps are you doing to get it to be recognized? I cannot add the sensors as the custom component will not load.

I have added this manually and attempted to do this through HACS by adding the repository. Both fail and your instructions are quite vague.

You need to download the custom component files from the repo by clicking the “code” button and selecting download zip.

then move the component folder (nws_alerts_coordinates - the whole thing) into your custom_components folder.

restart home assistant.

If you already added the config in yaml to HA then remove it until after HA restarts.

Then add the config following the example at the repo under the sensor: domain. I use packages fopr this so that’s where I put mine.

restart home assistant.

HACS won’t work because the repo is (intentionally) not HACS friendly.

the instructions are meant for users who know what they are doing to manually download and install integrations and configure them in yaml.

it’s mot hard to do but it’s more than a few clicks in the UI.

1 Like

I did exactly as you stated above and receive log errors that the custom_component does not exist. I have installed many components without using HACS. The issue is in your init.py as it is blank on your repo.

Yeah, sorry again. I inadvertently set you up for failure.

the docs for configuring the sensor were right but the platform in the actual code I used was wrong.

It was a last minute change to the platform (from “nws_alerts_coord” to “nws_alerts_coordinates”) and I forgot to transfer that change to the repo too.

to test it you can set up the platform with the first variation (“nws_alerts_coord”) in your current install and it should hopefully work.

But I recommend you re-download it one more time to alleviate any future confusion and then use the platform in the docs (“nws_alerts_coordinates”).

So it wasn’t the lack of content of the init file, which is OK to be empty. It was the wrong platform in the code.

Sorry again for the confusion. I whipped it up pretty quick yesterday and obviously stumbled a bit.

Got it working. Thank you!

1 Like

Thanks, Finity- This was an unexpected surprise :slight_smile:

I installed it on my test instance, and it appears to work. I put in GPS coordinates for Lubbock, Tx (33.5846,-101.8456), where there is currently a Red Flag warning, and HA pulled it right in!

1 Like

@finity will your package work with this new API implementation if I name the sensor nws_alerts?

It should.

the new integration provides all of the exact same info as the other one does.

Do you have an updated package? It seems to give me issues where I am not getting notifications on my mobile device (pushover) and also TTS (Alexa). I did modify the package according to my deployment. Thoughts?