From 4cf6c6f4dda2d663af91ecc709596f3dad1e2b01 Mon Sep 17 00:00:00 2001 From: dselzle <40190089+dselzle@users.noreply.github.com> Date: Mon, 5 Aug 2024 14:52:02 -0500 Subject: [PATCH] Fix entity ID in "NWS Alerts Announce Weather Alert" automation Automation was pointing to sensor.nws_alerts_test instead of sensor.nws_alerts --- packages/nws_alerts_package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nws_alerts_package.yaml b/packages/nws_alerts_package.yaml index 37c2e07..30bb283 100644 --- a/packages/nws_alerts_package.yaml +++ b/packages/nws_alerts_package.yaml @@ -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) %}