So I’ve been using the NWS Alerts integration great, it updates my location, and tells me the active alerts. I’ve been trying to use it to replace the standard weather app on my phone for alerts, and leverage HA to use a speaker and maybe run some automations. Thing is, it doesn’t trigger.
I’ve built several automations and they’ve never fired, mainly because they haven’t re-occurred yet since I built them off of the Attributes. But today I had a NWS Alert that I did build one for, that expired, and got renewed, but my system never actioned on it. So where did I go wrong?
This is a snippet of the trigger portion, which I figure is the failing part. If I run this manually, I get notified fine, and it plays the sound file file, and TTS fine, etc. It just didn’t fire automatically when the alert came.
I have time conditions because this type alert shouldn’t come in after sleeping hours, but if it does, it’s too late or for a different day and I don’t want it going off in the middle of the night for this one. If I can get this one working, then I’ll do some for tornadoes and such, and those I want to hit whenever they are posted. I don’t think the conditions had anything to do with it, so I’m guessing my trigger or value is incorrect somehow?
alias: Weather_Alert_Cold_Weather
description: “”
triggers:
- trigger: state
entity_id:- sensor.nws_alerts
attribute: Alerts
to: “Event: Cold Weather Advisory”
conditions:
- sensor.nws_alerts
- condition: time
after: “08:00:00”
before: “20:00:00”
weekday:- sun
- mon
- tue
- wed
- thu
- fri
- sat
actions:
- action: notify.mobile_app_xxxxxxxx
metadata: {}
data:
message: Cold Weather Advisory! !Warning!
title:
data:
TTL: 0
priority: high - action: media_player.play_media
target:
entity_id: media_player.vlc_telnet
data:
media_content_id: media-source://media_source/local/imperial_alert.mp3
media_content_type: audio/mpeg