blueprints/automation/wd-close-weather-notification.yaml aktualisiert

This commit is contained in:
2025-08-30 09:16:34 +00:00
parent 4e28cdd98a
commit 8d8f957a5b

View File

@@ -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 }}