Add multiple notify targets and cancel delay setting

This commit is contained in:
martin 2026-05-31 12:41:25 +00:00
parent 098c7207c5
commit d4a0a5dd82

View file

@ -67,6 +67,20 @@ blueprint:
unit_of_measurement: min
mode: slider
cancel_delay_seconds:
name: Verzögerung beim Abbruch (Sekunden)
description: >
Wie lange der Schalter auf ON bleibt, bevor er bei "nicht nötig" oder
"Fenster offen" zurückgesetzt wird. Gibt dem Nutzer Zeit, den Status zu sehen.
default: 5
selector:
number:
min: 0
max: 60
step: 1
unit_of_measurement: s
mode: slider
room_name:
name: Raumname
description: Wird in der Push-Nachricht angezeigt (z. B. Schlafzimmer)
@ -75,14 +89,15 @@ blueprint:
text:
notify_target:
name: Benachrichtigungsgerät (optional)
name: Benachrichtigungsgerät(e) (optional)
description: >
Notify-Entität für Push-Nachrichten, z. B. notify.iphone_84.
Ein oder mehrere Notify-Entitäten für Push-Nachrichten, z. B. notify.iphone_84.
Leer lassen für keine Benachrichtigung.
default: ""
default: []
selector:
entity:
domain: notify
multiple: true
variables:
dehumidify_switch: !input dehumidify_switch
@ -91,6 +106,7 @@ variables:
humidity_threshold: !input humidity_threshold
contact_sensors: !input contact_sensors
duration_minutes: !input duration_minutes
cancel_delay_seconds: !input cancel_delay_seconds
room_name: !input room_name
notify_target: !input notify_target
previous_mode: "{{ state_attr(climate_entity, 'hvac_mode') | default(states(climate_entity)) }}"
@ -110,7 +126,7 @@ action:
sequence:
- if:
- condition: template
value_template: "{{ notify_target != '' }}"
value_template: "{{ notify_target | length > 0 }}"
then:
- service: notify.send_message
target:
@ -119,6 +135,8 @@ action:
title: "👍 Entfeuchtung nicht nötig"
message: >
{{ room_name }}: Luftfeuchtigkeit ist in Ordnung ({{ states(humidity_sensor) | round(1) }} % — Grenzwert {{ humidity_threshold }} %).
- delay:
seconds: "{{ cancel_delay_seconds }}"
- service: input_boolean.turn_off
target:
entity_id: !input dehumidify_switch
@ -133,7 +151,7 @@ action:
sequence:
- if:
- condition: template
value_template: "{{ notify_target != '' }}"
value_template: "{{ notify_target | length > 0 }}"
then:
- service: notify.send_message
target:
@ -143,6 +161,8 @@ action:
message: >
{{ room_name }}: Fenster oder Tür ist geöffnet Entfeuchtung nicht gestartet.
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
- delay:
seconds: "{{ cancel_delay_seconds }}"
- service: input_boolean.turn_off
target:
entity_id: !input dehumidify_switch
@ -156,7 +176,7 @@ action:
- if:
- condition: template
value_template: "{{ notify_target != '' }}"
value_template: "{{ notify_target | length > 0 }}"
then:
- service: notify.send_message
target:
@ -198,7 +218,7 @@ action:
- if:
- condition: template
value_template: "{{ notify_target != '' }}"
value_template: "{{ notify_target | length > 0 }}"
then:
- service: notify.send_message
target: