use value template instead of state

This commit is contained in:
2025-12-07 17:43:27 +01:00
parent 2ce92eb995
commit bdefd74801

View File

@@ -140,9 +140,9 @@ actions:
- condition: trigger - condition: trigger
id: id:
- FENSTER_OPEN - FENSTER_OPEN
- condition: state - condition: template
entity_id: "{{ window_detection_entity }}" value_template: >
state: "off" {{ is_state(window_detection_entity, 'off') }}
sequence: sequence:
- service: switch.turn_on - service: switch.turn_on
target: target:
@@ -152,9 +152,9 @@ actions:
- condition: trigger - condition: trigger
id: id:
- FENSTER_CLOSED - FENSTER_CLOSED
- condition: state - condition: template
entity_id: "{{ window_detection_entity }}" value_template: >
state: "on" {{ is_state(window_detection_entity, 'on') }}
sequence: sequence:
- service: switch.turn_off - service: switch.turn_off
target: target: