@RyanLehms Thanks for sharing the automation rule!
Ryan, when more than 1 alert is issued, the field will be like Description_TYPE. So for example, if you get 2 alerts like this:
[.. SNIP..]
"alerts": [
{
"type": "FLO",
"description": "Areal Flood Warning",
"date": "9:36 PM CDT on September 22, 2016",
"date_epoch": "1474598160",
"expires": "10:00 AM CDT on September 23, 2016",
"expires_epoch": "1474642800",
"tz_short":"CDT",
"tz_long":"America/Chicago",
"message": "\u000AThe National Weather Service in La Crosse has extended the\u000A\u000A* Flood Warning for...\u000A Clayton County in northeastern Iowa...\u",
"phenomena": "FA",
},
{
"type": "WAT",
"description": "Flash Flood Watch",
"date": "8:25 PM CDT on September 22, 2016",
"date_epoch": "1474593900",
"expires": "1:00 PM CDT on September 23, 2016",
"expires_epoch": "1474653600",
"tz_short":"CDT",
"tz_long":"America/Chicago",
"message": "\u000A...Flash Flood Watch remains in effect through Friday afternoon...\u000A\",
},
[.. SNIP..]
It will create a structure like: {{ states.sensor.pws_alerts.attributes.Description_FLO == "Areal Flood Warning" }}
and {{ states.sensor.pws_alerts.attributes.Description_WAT == "Flash Flood Watch" }}
I thought using this exactly for condition triggers then you can combine condition: or
operator to monitor special alert advisories. Also based on my research on the API, a location cannot have the more than 1 advisory type of the same type.
Hope this helps.
Please let me know if you think there is a better way.
Cheers!