Skip to content

Commit

Permalink
Merge pull request #86 from dselzle/patch-1
Browse files Browse the repository at this point in the history
Fix entity ID in  "NWS Alerts Announce Weather Alert" automation
  • Loading branch information
finity69x2 authored Aug 11, 2024
2 parents 60bebfa + 4cf6c6f commit 1c2a1c5
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 1c2a1c5

Please sign in to comment.