Add multiple notify targets and cancel delay setting
This commit is contained in:
parent
098c7207c5
commit
d4a0a5dd82
1 changed files with 27 additions and 7 deletions
|
|
@ -67,6 +67,20 @@ blueprint:
|
||||||
unit_of_measurement: min
|
unit_of_measurement: min
|
||||||
mode: slider
|
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:
|
room_name:
|
||||||
name: Raumname
|
name: Raumname
|
||||||
description: Wird in der Push-Nachricht angezeigt (z. B. Schlafzimmer)
|
description: Wird in der Push-Nachricht angezeigt (z. B. Schlafzimmer)
|
||||||
|
|
@ -75,14 +89,15 @@ blueprint:
|
||||||
text:
|
text:
|
||||||
|
|
||||||
notify_target:
|
notify_target:
|
||||||
name: Benachrichtigungsgerät (optional)
|
name: Benachrichtigungsgerät(e) (optional)
|
||||||
description: >
|
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.
|
Leer lassen für keine Benachrichtigung.
|
||||||
default: ""
|
default: []
|
||||||
selector:
|
selector:
|
||||||
entity:
|
entity:
|
||||||
domain: notify
|
domain: notify
|
||||||
|
multiple: true
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
dehumidify_switch: !input dehumidify_switch
|
dehumidify_switch: !input dehumidify_switch
|
||||||
|
|
@ -91,6 +106,7 @@ variables:
|
||||||
humidity_threshold: !input humidity_threshold
|
humidity_threshold: !input humidity_threshold
|
||||||
contact_sensors: !input contact_sensors
|
contact_sensors: !input contact_sensors
|
||||||
duration_minutes: !input duration_minutes
|
duration_minutes: !input duration_minutes
|
||||||
|
cancel_delay_seconds: !input cancel_delay_seconds
|
||||||
room_name: !input room_name
|
room_name: !input room_name
|
||||||
notify_target: !input notify_target
|
notify_target: !input notify_target
|
||||||
previous_mode: "{{ state_attr(climate_entity, 'hvac_mode') | default(states(climate_entity)) }}"
|
previous_mode: "{{ state_attr(climate_entity, 'hvac_mode') | default(states(climate_entity)) }}"
|
||||||
|
|
@ -110,7 +126,7 @@ action:
|
||||||
sequence:
|
sequence:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ notify_target != '' }}"
|
value_template: "{{ notify_target | length > 0 }}"
|
||||||
then:
|
then:
|
||||||
- service: notify.send_message
|
- service: notify.send_message
|
||||||
target:
|
target:
|
||||||
|
|
@ -119,6 +135,8 @@ action:
|
||||||
title: "👍 Entfeuchtung nicht nötig"
|
title: "👍 Entfeuchtung nicht nötig"
|
||||||
message: >
|
message: >
|
||||||
{{ room_name }}: Luftfeuchtigkeit ist in Ordnung ({{ states(humidity_sensor) | round(1) }} % — Grenzwert {{ humidity_threshold }} %).
|
{{ room_name }}: Luftfeuchtigkeit ist in Ordnung ({{ states(humidity_sensor) | round(1) }} % — Grenzwert {{ humidity_threshold }} %).
|
||||||
|
- delay:
|
||||||
|
seconds: "{{ cancel_delay_seconds }}"
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: !input dehumidify_switch
|
entity_id: !input dehumidify_switch
|
||||||
|
|
@ -133,7 +151,7 @@ action:
|
||||||
sequence:
|
sequence:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ notify_target != '' }}"
|
value_template: "{{ notify_target | length > 0 }}"
|
||||||
then:
|
then:
|
||||||
- service: notify.send_message
|
- service: notify.send_message
|
||||||
target:
|
target:
|
||||||
|
|
@ -143,6 +161,8 @@ action:
|
||||||
message: >
|
message: >
|
||||||
{{ room_name }}: Fenster oder Tür ist geöffnet – Entfeuchtung nicht gestartet.
|
{{ room_name }}: Fenster oder Tür ist geöffnet – Entfeuchtung nicht gestartet.
|
||||||
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
||||||
|
- delay:
|
||||||
|
seconds: "{{ cancel_delay_seconds }}"
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: !input dehumidify_switch
|
entity_id: !input dehumidify_switch
|
||||||
|
|
@ -156,7 +176,7 @@ action:
|
||||||
|
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ notify_target != '' }}"
|
value_template: "{{ notify_target | length > 0 }}"
|
||||||
then:
|
then:
|
||||||
- service: notify.send_message
|
- service: notify.send_message
|
||||||
target:
|
target:
|
||||||
|
|
@ -198,7 +218,7 @@ action:
|
||||||
|
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ notify_target != '' }}"
|
value_template: "{{ notify_target | length > 0 }}"
|
||||||
then:
|
then:
|
||||||
- service: notify.send_message
|
- service: notify.send_message
|
||||||
target:
|
target:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue