finity69x2 / nws_alerts

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

Multiple alerts only speak / show first received alert. #31

Closed philbert2k closed 2 years ago

philbert2k commented 2 years ago

I have been noticing that when there are alerts, the only alert that gets "processed" by automations is the first received.

For example:

{{states.sensor.nws_alert_count.state}}
{{states.sensor.nws_alert_event.state}}

Outputs

2
Special Weather Statement

In this case, there is a Special Weather Statement AND a Tornado Watch, but the watch doesn't appear visible - from what I can see.

Is there a way to process all alerts via the automations, spoken and notified.

finity69x2 commented 2 years ago

how did you create those sensors?

philbert2k commented 2 years ago

how did you create those sensors?

They were either created by following instructions for install/initial config -or- programmatically by the script/add-on itself.

finity69x2 commented 2 years ago

I'm pretty sure that isn't correct.

The integration only creates one sensor called "sensor.nws_alerts" unless you gave it a custom name. But even then it will still only ever give you one sensor.

You had to have created those sensors yourself.

philbert2k commented 2 years ago

I'm pretty sure that isn't correct.

The integration only creates one sensor called "sensor.nws_alerts" unless you gave it a custom name. But even then it will still only ever give you one sensor.

You had to have created those sensors yourself.

Took a sec but I finally figured out where I got them from.

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

Does this help any?

finity69x2 commented 2 years ago

That post was made before this integration was created so those sensors are no longer needed.

I recommend you look at the "nws_alerts_custom_package.yaml" in the "packages" directory of this repo for the latest code I use for this integration.

if you aren't using this integration and are still using the old API version of the code then I recommend you update to using the custom integration here.

and if you need additional help with automations and such related to the integration you should go to that thread you mentioned and post questions there. You will likely get more help with that kind of thing there rather than here since it's not really an integration issue.