Closed NRutt2005 closed 1 month ago
These are the header and the first alert. There are currently 4 in my area.
I hope this helps. Let me know if you need more shots of the data.
I would really like to have some example data so I can test my templates
Here's what I did to get data when my local forecast was all sunshine and pretty:
Have fun!
Can you guys share your yaml on the trigger method of the specific attributes? I see under "spoken_desc" attribute for my area:
FLOOD WATCH REMAINS IN EFFECT THROUGH WEDNESDAY MORNING
HIGH SURF ADVISORY REMAINS IN EFFECT UNTIL 4 AM PST TUESDAY
WIND ADVISORY REMAINS IN EFFECT UNTIL 4 AM PST TUESDAY
Title attribute:
title: Flood Watch - High Surf Advisory - Wind Advisory
I don't care about the high surf advisory but want the Wind and flood advisory as triggers
Ok I think I got it, might be a more graceful way to do multiple ORs in the template
trigger:
- platform: template
value_template: >-
{{ state_attr('sensor.nws_alerts', 'title') is search('Flood',
ignorecase=True) }}
- platform: template
value_template: >-
{{ state_attr('sensor.nws_alerts', 'title') is search('Wind',
ignorecase=True) }}
- platform: template
value_template: >-
{{ state_attr('sensor.nws_alerts', 'title') is search('Fire',
ignorecase=True) }}
- platform: template
value_template: >-
{{ state_attr('sensor.nws_alerts', 'title') is search('Tornado',
ignorecase=True) }}
- platform: template
value_template: >-
{{ state_attr('sensor.nws_alerts', 'title') is search('Storm',
ignorecase=True) }}
Found a better way by adding a template sensor, if you're interested:
sensor:
- platform: template
sensors:
weather_alert:
friendly_name: "Weather Alert"
value_template: >-
{{ 'flood' in state_attr('sensor.nws_alerts', 'title') | lower or
'rain' in state_attr('sensor.nws_alerts', 'title') | lower or
'storm' in state_attr('sensor.nws_alerts', 'title') | lower or
'tornado' in state_attr('sensor.nws_alerts', 'title') | lower }}
It's typically better to get help on implementation of automations in HA via the HA forums instead of opening an issue for something like this as it's not technically an issue.
Question about this integration. Wasn't sure where else to ask the question. I see that the integration outputs the following attribute products:
I just set this integration up but I would like to set up automations for Severe Thunderstorm Warnings, Tornado Warnings, Tornado Watches, Severe Thunderstorm Watches, etc. Does anyone have screen shots of this integration and the attribute data that is populated for these attributes? Currently it just has 'null' as the attribute values obviously because there hasn't been a weather watch/warning issued since the setup. Just would like a little insight into the data values that will be populated. Thank you!