mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-05-15 12:34:42 +00:00
Use is_state_attr
This commit is contained in:
@@ -3,7 +3,7 @@ switch:
|
||||
switches:
|
||||
tapo_bedroom:
|
||||
friendly_name: "Bedroom Camera"
|
||||
value_template: "{{ state_attr('camera.bedroom_hd', 'privacy_mode') == 'off' }}"
|
||||
value_template: "{{ is_state_attr('camera.bedroom_hd', 'privacy_mode', 'off') }}"
|
||||
turn_on:
|
||||
service: script.tapo_bedroom_on
|
||||
turn_off:
|
||||
@@ -19,7 +19,7 @@ script:
|
||||
tapo_bedroom_toggle:
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions: "{{ state_attr('camera.bedroom_hd', 'privacy_mode') == 'off' }}"
|
||||
- conditions: "{{ is_state_attr('camera.bedroom_hd', 'privacy_mode', 'off') }}"
|
||||
sequence:
|
||||
- service: script.tapo_bedroom_off
|
||||
|
||||
|
||||
Reference in New Issue
Block a user