mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-09 19:18:43 +00:00
Move config out of subfolder
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
switch:
|
||||
- platform: template
|
||||
switches:
|
||||
tapo_bedroom:
|
||||
friendly_name: "Bedroom Camera"
|
||||
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 is_state('switch.bedroom_privacy', 'off') %}
|
||||
mdi:video
|
||||
{% else %}
|
||||
mdi:video-off
|
||||
{% endif %}
|
||||
|
||||
script:
|
||||
tapo_bedroom_toggle:
|
||||
sequence:
|
||||
- choose:
|
||||
- conditions: "{{ is_state('switch.bedroom_privacy', 'on') }}"
|
||||
sequence:
|
||||
- service: script.tapo_bedroom_off
|
||||
|
||||
default:
|
||||
- service: script.tapo_bedroom_on
|
||||
|
||||
tapo_bedroom_on:
|
||||
sequence:
|
||||
- service: switch.turn_off
|
||||
entity_id: switch.bedroom_privacy
|
||||
- service: select.select_option
|
||||
entity_id: select.bedroom_move_to_preset
|
||||
data:
|
||||
option: away
|
||||
|
||||
|
||||
tapo_bedroom_off:
|
||||
sequence:
|
||||
- service: select.select_option
|
||||
entity_id: select.bedroom_move_to_preset
|
||||
data:
|
||||
option: home
|
||||
- service: switch.turn_on
|
||||
entity_id: switch.bedroom_privacy
|
||||
Reference in New Issue
Block a user