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