From 52d4ea7ed16b83c91b394dd438c944c15c1c5985 Mon Sep 17 00:00:00 2001 From: thomas Date: Sat, 30 Aug 2025 08:57:55 +0000 Subject: [PATCH] blueprints/automation/wd-close-weather-notification.yaml aktualisiert --- .../wd-close-weather-notification.yaml | 24 ++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/blueprints/automation/wd-close-weather-notification.yaml b/blueprints/automation/wd-close-weather-notification.yaml index fa37480..2b4efff 100644 --- a/blueprints/automation/wd-close-weather-notification.yaml +++ b/blueprints/automation/wd-close-weather-notification.yaml @@ -54,13 +54,22 @@ blueprint: unit_of_measurement: °C notify_target: name: Notification Target + description: Select one or more valid notification services (mobile app, Alexa, etc.) selector: - target: {} + target: + entity: + domain: notify custom_message: name: Custom Notification Message default: "{{ entity_name }} is open! Trigger: {{ trigger_state }}" selector: text: {} + emergency: + name: Emergency Notification + description: Send as a critical notification (only supported on iOS mobile app) + default: false + selector: + boolean: {} trigger: - platform: state @@ -85,8 +94,13 @@ action: selected_weather: !input weather_sensor selected_notify_target: !input notify_target selected_custom_message: !input custom_message + emergency_mode: !input emergency open_entities: > - {{ states | selectattr('entity_id','in',selected_openings) | selectattr('state','eq','on') | map(attribute='attributes.friendly_name') | list }} + {{ states + | selectattr('entity_id','in',selected_openings) + | selectattr('state','eq','on') + | map(attribute='attributes.friendly_name') + | list }} trigger_state: > {% if trigger.platform in ['numeric_state','state'] %} {{ trigger.to_state.state }} @@ -95,8 +109,8 @@ action: {% endif %} - service: notify.notify + target: !input notify_target data: - target: "{{ selected_notify_target }}" message: > {% for entity_name in open_entities %} {{ selected_custom_message @@ -104,3 +118,7 @@ action: | replace('{{ trigger_state }}', trigger_state) }} {% endfor %} + {% if emergency_mode %} + push: + interruption-level: critical + {% endif %}