Skip to content

Commit

Permalink
Fix entity ID in "NWS Alerts Announce Weather Alert" automation
Browse files Browse the repository at this point in the history
Automation was pointing to sensor.nws_alerts_test instead of sensor.nws_alerts
  • Loading branch information
dselzle authored Aug 5, 2024
1 parent 75cd58c commit 4cf6c6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/nws_alerts_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,14 @@ automation:
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.nws_alerts_test
entity_id: sensor.nws_alerts
condition:
- "{{states('sensor.nws_alerts') | int > 0}}"
- condition: template
value_template: >
{% set ns = namespace(ids=[]) %}
{% for x in range(0,states('sensor.nws_alerts')|int ) %}
{% set id = state_attr('sensor.nws_alerts_test', 'Alerts')[x].ID %}
{% set id = state_attr('sensor.nws_alerts', 'Alerts')[x].ID %}
{% set ns.ids = ns.ids + [id] %}
{% endfor -%}
{% set current_id_list = set(ns.ids) %}
Expand Down

0 comments on commit 4cf6c6f

Please sign in to comment.