change order of conditions
This commit is contained in:
@@ -203,6 +203,59 @@ triggers:
|
|||||||
|
|
||||||
actions:
|
actions:
|
||||||
- choose:
|
- choose:
|
||||||
|
# Heizperiode Switch Aktionen
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- HEATING_PERIOD_ON
|
||||||
|
- HEATING_PERIOD_OFF
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- HEATING_PERIOD_ON
|
||||||
|
sequence:
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: !input trv
|
||||||
|
data:
|
||||||
|
hvac_mode: "heat"
|
||||||
|
- if:
|
||||||
|
- condition: state
|
||||||
|
entity_id: !input window_sensor
|
||||||
|
state: "on"
|
||||||
|
then:
|
||||||
|
- service: switch.turn_on
|
||||||
|
target:
|
||||||
|
entity_id: "{{ window_detection_entity }}"
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: >
|
||||||
|
{{ target_temperature is not none and target_temperature | is_number }}
|
||||||
|
then:
|
||||||
|
- service: climate.set_temperature
|
||||||
|
target:
|
||||||
|
entity_id: !input trv
|
||||||
|
data:
|
||||||
|
temperature: "{{ target_temperature | float }}"
|
||||||
|
alias: Heizperiode aktiviert - Setze Modus auf heat, synchronisiere Fensterstatus und Solltemperatur
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- HEATING_PERIOD_OFF
|
||||||
|
sequence:
|
||||||
|
- service: switch.turn_off
|
||||||
|
target:
|
||||||
|
entity_id: "{{ window_detection_entity }}"
|
||||||
|
- service: climate.set_hvac_mode
|
||||||
|
target:
|
||||||
|
entity_id: !input trv
|
||||||
|
data:
|
||||||
|
hvac_mode: "off"
|
||||||
|
alias: Heizperiode deaktiviert - Setze Fenster geschlossen und Modus auf off
|
||||||
|
alias: Heizperiode Switch Änderung
|
||||||
|
alias: Heizperiode Switch Aktionen
|
||||||
# Alle bestehenden Aktionen nur ausführen wenn Heizperiode aktiv ist
|
# Alle bestehenden Aktionen nur ausführen wenn Heizperiode aktiv ist
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
@@ -300,57 +353,4 @@ actions:
|
|||||||
alias: Setze Solltemperatur basierend auf Alarm-Status
|
alias: Setze Solltemperatur basierend auf Alarm-Status
|
||||||
alias: Solltemperatur setzen
|
alias: Solltemperatur setzen
|
||||||
alias: Aktionen während Heizperiode
|
alias: Aktionen während Heizperiode
|
||||||
# Heizperiode Switch Aktionen
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id:
|
|
||||||
- HEATING_PERIOD_ON
|
|
||||||
- HEATING_PERIOD_OFF
|
|
||||||
sequence:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id:
|
|
||||||
- HEATING_PERIOD_ON
|
|
||||||
sequence:
|
|
||||||
- service: climate.set_hvac_mode
|
|
||||||
target:
|
|
||||||
entity_id: !input trv
|
|
||||||
data:
|
|
||||||
hvac_mode: "heat"
|
|
||||||
- if:
|
|
||||||
- condition: state
|
|
||||||
entity_id: !input window_sensor
|
|
||||||
state: "on"
|
|
||||||
then:
|
|
||||||
- service: switch.turn_on
|
|
||||||
target:
|
|
||||||
entity_id: "{{ window_detection_entity }}"
|
|
||||||
- if:
|
|
||||||
- condition: template
|
|
||||||
value_template: >
|
|
||||||
{{ target_temperature is not none and target_temperature | is_number }}
|
|
||||||
then:
|
|
||||||
- service: climate.set_temperature
|
|
||||||
target:
|
|
||||||
entity_id: !input trv
|
|
||||||
data:
|
|
||||||
temperature: "{{ target_temperature | float }}"
|
|
||||||
alias: Heizperiode aktiviert - Setze Modus auf heat, synchronisiere Fensterstatus und Solltemperatur
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id:
|
|
||||||
- HEATING_PERIOD_OFF
|
|
||||||
sequence:
|
|
||||||
- service: switch.turn_off
|
|
||||||
target:
|
|
||||||
entity_id: "{{ window_detection_entity }}"
|
|
||||||
- service: climate.set_hvac_mode
|
|
||||||
target:
|
|
||||||
entity_id: !input trv
|
|
||||||
data:
|
|
||||||
hvac_mode: "off"
|
|
||||||
alias: Heizperiode deaktiviert - Setze Fenster geschlossen und Modus auf off
|
|
||||||
alias: Heizperiode Switch Änderung
|
|
||||||
alias: Heizperiode Switch Aktionen
|
|
||||||
alias: Hauptsteuerung
|
alias: Hauptsteuerung
|
||||||
Reference in New Issue
Block a user