Fix tapo camera control

This commit is contained in:
Georgi Gardev
2022-12-01 16:01:59 +02:00
parent e9c9a15ced
commit 5e1e12bad9
+10 -10
View File
@@ -3,13 +3,13 @@ switch:
switches: switches:
tapo_bedroom: tapo_bedroom:
friendly_name: "Bedroom Camera" 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: turn_on:
service: script.tapo_bedroom_on service: script.tapo_bedroom_on
turn_off: turn_off:
service: script.tapo_bedroom_off service: script.tapo_bedroom_off
icon_template: > icon_template: >
{%if state_attr('camera.bedroom_hd', 'privacy_mode') %} {%if is_state('switch.bedroom_privacy', 'off') %}
mdi:video mdi:video
{% else %} {% else %}
mdi:video-off mdi:video-off
@@ -19,7 +19,7 @@ script:
tapo_bedroom_toggle: tapo_bedroom_toggle:
sequence: sequence:
- choose: - choose:
- conditions: "{{ is_state_attr('camera.bedroom_hd', 'privacy_mode', 'off') }}" - conditions: "{{ is_state('switch.bedroom_privacy', 'on') }}"
sequence: sequence:
- service: script.tapo_bedroom_off - service: script.tapo_bedroom_off
@@ -28,19 +28,19 @@ script:
tapo_bedroom_on: tapo_bedroom_on:
sequence: sequence:
- service: swtich.turn_off - service: switch.turn_off
entity_id: switch.bedroom_privacy entity_id: switch.bedroom_privacy
- service: input_select.select_option - service: select.select_option
entity_id: select.bedroom_move_to_preset entity_id: select.bedroom_move_to_preset
data: data:
option: "live" option: away
tapo_bedroom_off: tapo_bedroom_off:
sequence: sequence:
- service: input_select.select_option - service: select.select_option
entity_id: select.bedroom_move_to_preset entity_id: select.bedroom_move_to_preset
data: data:
option: "off" option: home
- service: swtich.turn_on - service: switch.turn_on
entity_id: switch.bedroom_privacy entity_id: switch.bedroom_privacy