use value template instead of state
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user