From 8d8f957a5b082489f66ba38eba0d065dc679b186 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 30 Aug 2025 09:16:34 +0000 Subject: [PATCH] blueprints/automation/wd-close-weather-notification.yaml aktualisiert --- .../automation/wd-close-weather-notification.yaml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/blueprints/automation/wd-close-weather-notification.yaml b/blueprints/automation/wd-close-weather-notification.yaml index 03f6727..d28dc78 100644 --- a/blueprints/automation/wd-close-weather-notification.yaml +++ b/blueprints/automation/wd-close-weather-notification.yaml @@ -83,12 +83,14 @@ action: message_template: !input custom_message notify_service_name: !input notify_service open_entities: > - {{ selected_openings - | map('string') - | map('states') - | selectattr('state','eq','on') - | map(attribute='attributes.friendly_name') - | list }} + {% set open_list = [] %} + {% for ent_id in selected_openings %} + {% set state_obj = states(ent_id) %} + {% if state_obj and state_obj.state == 'on' %} + {% set _ = open_list.append(state_obj.attributes.friendly_name) %} + {% endif %} + {% endfor %} + {{ open_list }} trigger_state: > {% if trigger.platform in ['numeric_state','state'] %} {{ trigger.to_state.state }}