NOAA weather alerts from weather.gov aka US National Weather Service

I just installed this component and that brings up a question related to the above post…

I see above in your screen shot that it seems the state there is the severity level of the first alert.

In your docs on github you state:

states: sensor will return the number of current alerts,

And it looks like right now my sensor is showing 0 as the state since I have no active alerts.

Does that mean that if there is an alert that the state will be a number showing how many alerts there are as it seems to say in the docs? Or will the state change to show the severity level of the most severe alert like in your screen shot above?

Sorry you must have checked it right before i updated the docs to reflect the new change. State is the number, as it will now dump the entire json of alerts, so if you wanted to deal with lots of alerts you could with the alerts_string

I am also trying to wrap my head around the county and zone request. Check out my github enhancement request note. Let me know if that’s what you had in mind.

Did you see this? Full noaa_sdk data and unlimited alerts supprt by claytonjn · Pull Request #1 · dcshoecomp/noaa_alerts · GitHub

Not really. I was hoping you could combine them into one sensor.

Right now the way the REST API works you can poll the website with multiple codes in the request and it will show all of the alerts for all of those zones/counties.

An example of a properly formatted REST request is:

https://api.weather.gov/alerts/active?zone=INZ009,INC033

The current alert component I’m using (from eracknaphobia) responds the same way. I have it set up for multiple zones and it combines them all into one sensor.

I like the idea of the state being the number of alerts. it should make it pretty easy to transition my alerts package to your component.

Hey @dcshoecomp I just submitted a PR based on the results of this thread:

If you could take a look and see what you think I would appreciate it.

EDIT:

Nevermind…

I didn’t realize that you added the “alerts” attribute back in a couple of days after I updated.

But as I mentioned in the other thread linked above, this is a very good example of a need to have this in an update tracker like HACS.

I’ll close that PR.

This works fine with HACS, just add the repo.

Good to know.

Since HACS is the way forward it would be nice if developers would either mention that in the repo install instructions or even better just get it added to the default store.

Ah, if it were only that easy…

I just added the repo manually to HACS and it didn’t install the latest version. It installed v0.0.7

For some reason HACS thinks the latest version is 0.0.7 when the code has 0.0.8 as the latest version.

It looks like the last version wasn’t updated in the list of releases.

I’ve manually updated my version again but that should be addressed to minimize confusion.

I have not used HACS. I plan on it now that i know about it! I will make sure it works accordingly with my repo with any new releases.

2 Likes

geting Integration not found error when I check config. Issue filed on GitHub.

It’s working for me on v96.3 but mine is not a new installation.

Did you install via HACS?

My HA is down at the moment as i am upgrading it to some ironwolf drives. I am currently spinning up a temporary docker container and will report back if i had any issues with 96.5, however before i took it down i wasn’t having issues.

Screenshot%20from%202019-07-29%2020-39-58
I just spun up the latest container on linux mint 19 which is basically Ubuntu 18.04 LTS with no issues. pycache is created at first run all the other 3 files are included in the latest release zip and are required.

If this is the first custom component you have setup? If it is see the directory structure on the screenshot, and in your config make sure your editor doesn’t auto correct to Sensor: ** note the capital S it needs to be lowercase.

Thanks for the help!

Not my first custom component and all others are working as intended (minus 1, but it needs to access a USB stick and I’m still trying to sort that out. not related to this)

image

Using VScode as my editor so no auto-capitalization going on.

sensor:

  - platform: noaa_alerts
    zoneid: TXZ205

I guess I need to ask again?

I just installed via HACS and everything is working fine.
I did notice that the sensor appends the zoneID onto the sensor name…
I tried to use the "name: " but it wasn’t supported.

I am no dev, is this is this something that would be easy to add to the component?
Or is it preferred to do this through customization instead of configuration?

Whoops I forgot to add that modification to the docs. You should be able to do multiple zoneid’s thus why it appends the zoneid to the sensor.

If you were asking me, I did not

I’ll delete and try that now though

edit: aaaaaaaaaaaaand now it’s working!!! Thanks!!!

1 Like

Cool!

Sounds like a copy/paste error in the directory structure maybe?