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