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

This commit is contained in:
2025-08-30 09:09:00 +00:00
parent f202484618
commit 567881f673

View File

@@ -55,9 +55,11 @@ blueprint:
default: "{{ entity_name }} is open! Trigger: {{ trigger_state }}"
selector:
text: {}
trigger:
- platform: state
entity_id: !input weather_sensor
# Cannot split in trigger, so we use a single state
to: !input weather_trigger_states
- platform: numeric_state
entity_id: !input temperature_sensor
@@ -65,15 +67,20 @@ trigger:
- platform: numeric_state
entity_id: !input temperature_sensor
below: !input temp_below
condition:
- condition: state
entity_id: !input openings
state: 'on'
action:
- variables:
selected_openings: !input openings
message_template: !input custom_message
notify_service_name: !input notify_service
open_entities: >
{{ states
| selectattr('entity_id','in', !input openings)
| selectattr('entity_id','in', selected_openings)
| selectattr('state','eq','on')
| map(attribute='attributes.friendly_name')
| list }}
@@ -83,11 +90,12 @@ action:
{% else %}
unknown
{% endif %}
- service: "{{ !input notify_service }}"
- service: "{{ notify_service_name }}"
data:
message: >
{% for entity_name in open_entities %}
{{ !input custom_message
{{ message_template
| replace('{{ entity_name }}', entity_name)
| replace('{{ trigger_state }}', trigger_state)
}}