change order of conditions

This commit is contained in:
2025-12-14 16:10:30 +01:00
parent 49263eb1ca
commit 34c7cc90b9

View File

@@ -203,6 +203,59 @@ triggers:
actions:
- 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
- conditions:
- condition: template
@@ -300,57 +353,4 @@ actions:
alias: Setze Solltemperatur basierend auf Alarm-Status
alias: Solltemperatur setzen
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