mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-04-29 06:48:16 +00:00
16 lines
523 B
YAML
16 lines
523 B
YAML
# https://www.home-assistant.io/integrations/switch
|
|
|
|
- platform: template
|
|
switches:
|
|
camera:
|
|
friendly_name: "Security Camera"
|
|
value_template: "{{ state_attr('camera.amcrest_camera', 'motion_recording') == 'on' }}"
|
|
icon_template: >
|
|
{% if state_attr('camera.amcrest_camera', 'motion_recording') == 'on' %} mdi:shield-home
|
|
{% else %} mdi:shield-off
|
|
{% endif %}
|
|
turn_on:
|
|
service: script.security_camera_on
|
|
turn_off:
|
|
service: script.security_camera_off
|