I have a state trigger to trap NWS Alerts alerts which should trap any state or attribute changes:
trigger: state
entity_id:
- sensor.nws_alerts_alerts
enabled: true
For testing purposes I have added numerous zone ID’s (about 8) from the NWS active alerts website (See below). You can see there are 11 active alerts. I let it run all night and after about 10 hours the traces show that it only detected 4 alerts. Any idea why I’m seeing so few alerts?
It’s hard to know why without seeing the full history of the entity and the entire automation.
there could be multiple alerts that all came thru at once so the count would change to a higher number but it would only alert once. For example if it went from 0 → 3 → 7 → 11 you would only get 4 alerts from the state change of the entity.
or there could be a condition that is preventing the automation running.
Yes, I do have the two time conditions below. I didn’t think that would effect the trigger though. Looking at the trigger it was only “triggered” 4 times in one night. And none at my time conditions listed below. That was with about 8 active zones configured.
I think what you said about the state change of the entity makes sense in my case. I just thought a lot of zone id’s equated to a lot of state changes.
Thanks for your help with this I really appreciate it!
condition: or
conditions:
- condition: time
after: "02:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
before: "03:00:00"
enabled: true
- condition: time
after: "13:00:00"
weekday:
- sun
- mon
- tue
- wed
- thu
- fri
- sat
before: "14:00:00"
enabled: true
enabled: true