Add notification when humidity is already OK or window is open
This commit is contained in:
parent
7e0d6193ad
commit
5300c9cf3c
1 changed files with 91 additions and 60 deletions
|
|
@ -6,7 +6,7 @@ blueprint:
|
||||||
Luftfeuchtigkeit und geschlossenen Fenstern/Türen. Bricht ab, sobald
|
Luftfeuchtigkeit und geschlossenen Fenstern/Türen. Bricht ab, sobald
|
||||||
ein Fenster oder eine Tür geöffnet wird, und setzt die Klimaanlage
|
ein Fenster oder eine Tür geöffnet wird, und setzt die Klimaanlage
|
||||||
danach auf den vorherigen Modus zurück. Optional: Push-Benachrichtigung
|
danach auf den vorherigen Modus zurück. Optional: Push-Benachrichtigung
|
||||||
beim Start und Ende mit aktuellem Feuchtigkeitswert.
|
beim Start, Ende und wenn die Entfeuchtung nicht nötig ist.
|
||||||
domain: automation
|
domain: automation
|
||||||
input:
|
input:
|
||||||
dehumidify_switch:
|
dehumidify_switch:
|
||||||
|
|
@ -99,79 +99,110 @@ trigger:
|
||||||
entity_id: !input dehumidify_switch
|
entity_id: !input dehumidify_switch
|
||||||
to: "on"
|
to: "on"
|
||||||
|
|
||||||
condition:
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{{ states(humidity_sensor) | float(0) > humidity_threshold | float(0) }}
|
|
||||||
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{{ expand(contact_sensors)
|
|
||||||
| selectattr('state', 'eq', 'on')
|
|
||||||
| list
|
|
||||||
| count == 0 }}
|
|
||||||
|
|
||||||
action:
|
action:
|
||||||
- service: climate.set_hvac_mode
|
|
||||||
target:
|
|
||||||
entity_id: !input climate_entity
|
|
||||||
data:
|
|
||||||
hvac_mode: dry
|
|
||||||
|
|
||||||
- if:
|
|
||||||
- condition: template
|
|
||||||
value_template: "{{ notify_target != '' }}"
|
|
||||||
then:
|
|
||||||
- service: "{{ notify_target }}"
|
|
||||||
data:
|
|
||||||
title: "💧 Entfeuchtung gestartet"
|
|
||||||
message: >
|
|
||||||
{{ room_name }}: Klimaanlage läuft im Dry-Modus für {{ duration_minutes }} Minuten.
|
|
||||||
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
|
||||||
|
|
||||||
- wait_for_trigger:
|
|
||||||
- platform: template
|
|
||||||
value_template: >
|
|
||||||
{{ expand(contact_sensors)
|
|
||||||
| selectattr('state', 'eq', 'on')
|
|
||||||
| list
|
|
||||||
| count > 0 }}
|
|
||||||
timeout:
|
|
||||||
minutes: !input duration_minutes
|
|
||||||
continue_on_timeout: true
|
|
||||||
|
|
||||||
- choose:
|
- choose:
|
||||||
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: >
|
value_template: >
|
||||||
{{ previous_mode in ['off', 'heat', 'cool', 'heat_cool', 'auto', 'fan_only'] }}
|
{{ states(humidity_sensor) | float(0) <= humidity_threshold | float(0) }}
|
||||||
sequence:
|
sequence:
|
||||||
- service: climate.set_hvac_mode
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ notify_target != '' }}"
|
||||||
|
then:
|
||||||
|
- service: "{{ notify_target }}"
|
||||||
|
data:
|
||||||
|
title: "👍 Entfeuchtung nicht nötig"
|
||||||
|
message: >
|
||||||
|
{{ room_name }}: Luftfeuchtigkeit ist in Ordnung ({{ states(humidity_sensor) | round(1) }} % — Grenzwert {{ humidity_threshold }} %).
|
||||||
|
- service: input_boolean.turn_off
|
||||||
target:
|
target:
|
||||||
entity_id: !input climate_entity
|
entity_id: !input dehumidify_switch
|
||||||
data:
|
|
||||||
hvac_mode: "{{ previous_mode }}"
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ expand(contact_sensors)
|
||||||
|
| selectattr('state', 'eq', 'on')
|
||||||
|
| list
|
||||||
|
| count > 0 }}
|
||||||
|
sequence:
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ notify_target != '' }}"
|
||||||
|
then:
|
||||||
|
- service: "{{ notify_target }}"
|
||||||
|
data:
|
||||||
|
title: "🪟 Entfeuchtung abgebrochen"
|
||||||
|
message: >
|
||||||
|
{{ room_name }}: Fenster oder Tür ist geöffnet – Entfeuchtung nicht gestartet.
|
||||||
|
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: !input dehumidify_switch
|
||||||
|
|
||||||
default:
|
default:
|
||||||
- service: climate.set_hvac_mode
|
- service: climate.set_hvac_mode
|
||||||
target:
|
target:
|
||||||
entity_id: !input climate_entity
|
entity_id: !input climate_entity
|
||||||
data:
|
data:
|
||||||
hvac_mode: "off"
|
hvac_mode: dry
|
||||||
|
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ notify_target != '' }}"
|
value_template: "{{ notify_target != '' }}"
|
||||||
then:
|
then:
|
||||||
- service: "{{ notify_target }}"
|
- service: "{{ notify_target }}"
|
||||||
data:
|
data:
|
||||||
title: "✅ Entfeuchtung beendet"
|
title: "💧 Entfeuchtung gestartet"
|
||||||
message: >
|
message: >
|
||||||
{{ room_name }}: Klimaanlage wurde zurückgesetzt.
|
{{ room_name }}: Klimaanlage läuft im Dry-Modus für {{ duration_minutes }} Minuten.
|
||||||
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
||||||
|
|
||||||
- service: input_boolean.turn_off
|
- wait_for_trigger:
|
||||||
target:
|
- platform: template
|
||||||
entity_id: !input dehumidify_switch
|
value_template: >
|
||||||
|
{{ expand(contact_sensors)
|
||||||
|
| selectattr('state', 'eq', 'on')
|
||||||
|
| list
|
||||||
|
| count > 0 }}
|
||||||
|
timeout:
|
||||||
|
minutes: !input duration_minutes
|
||||||
|
continue_on_timeout: true
|
||||||
|
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ previous_mode in ['off', 'heat', 'cool', 'heat_cool', 'auto', 'fan_only'] }}
|
||||||
|
sequence:
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: !input climate_entity
|
||||||
|
data:
|
||||||
|
hvac_mode: "{{ previous_mode }}"
|
||||||
|
default:
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: !input climate_entity
|
||||||
|
data:
|
||||||
|
hvac_mode: "off"
|
||||||
|
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ notify_target != '' }}"
|
||||||
|
then:
|
||||||
|
- service: "{{ notify_target }}"
|
||||||
|
data:
|
||||||
|
title: "✅ Entfeuchtung beendet"
|
||||||
|
message: >
|
||||||
|
{{ room_name }}: Klimaanlage wurde zurückgesetzt.
|
||||||
|
Aktuelle Luftfeuchtigkeit: {{ states(humidity_sensor) | round(1) }} %
|
||||||
|
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: !input dehumidify_switch
|
||||||
|
|
||||||
mode: single
|
mode: single
|
||||||
max_exceeded: silent
|
max_exceeded: silent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue