From 5e1e12bad9552124efb3769c25d500f34aea2f46 Mon Sep 17 00:00:00 2001 From: Georgi Gardev Date: Thu, 1 Dec 2022 16:01:59 +0200 Subject: [PATCH] Fix tapo camera control --- config/packages/devices/bedroom/tapo.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/config/packages/devices/bedroom/tapo.yaml b/config/packages/devices/bedroom/tapo.yaml index 62b6ac9..9571b48 100644 --- a/config/packages/devices/bedroom/tapo.yaml +++ b/config/packages/devices/bedroom/tapo.yaml @@ -3,13 +3,13 @@ switch: switches: tapo_bedroom: friendly_name: "Bedroom Camera" - value_template: "{{ is_state_attr('camera.bedroom_hd', 'privacy_mode', 'off') }}" + value_template: "{{ is_state('switch.bedroom_privacy', 'off') }}" turn_on: service: script.tapo_bedroom_on turn_off: service: script.tapo_bedroom_off icon_template: > - {%if state_attr('camera.bedroom_hd', 'privacy_mode') %} + {%if is_state('switch.bedroom_privacy', 'off') %} mdi:video {% else %} mdi:video-off @@ -19,7 +19,7 @@ script: tapo_bedroom_toggle: sequence: - choose: - - conditions: "{{ is_state_attr('camera.bedroom_hd', 'privacy_mode', 'off') }}" + - conditions: "{{ is_state('switch.bedroom_privacy', 'on') }}" sequence: - service: script.tapo_bedroom_off @@ -28,19 +28,19 @@ script: tapo_bedroom_on: sequence: - - service: swtich.turn_off + - service: switch.turn_off entity_id: switch.bedroom_privacy - - service: input_select.select_option + - service: select.select_option entity_id: select.bedroom_move_to_preset data: - option: "live" + option: away + tapo_bedroom_off: sequence: - - service: input_select.select_option + - service: select.select_option entity_id: select.bedroom_move_to_preset data: - option: "off" - - service: swtich.turn_on + option: home + - service: switch.turn_on entity_id: switch.bedroom_privacy -