Files
sarah/config/packages/devices/living_room/camera.yaml
T
2021-01-30 20:05:57 +02:00

24 lines
763 B
YAML

# https://www.home-assistant.io/integrations/amcrest
# amcrest:
# - host: !secret amcrest_ip
# username: !secret amcrest_username
# password: !secret amcrest_password
# resolution: low
# binary_sensors:
# - online
binary_sensor:
- platform: template
sensors:
camera_state:
friendly_name: Security camera
device_class: safety
value_template: >-
{{ is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') }}
icon_template: >-
{% if is_state('camera.mercury_amcrest_1', 'streaming') or is_state('camera.mercury_amcrest_1', 'recording') %}
mdi:video
{% else %}
mdi:video-off
{% endif %}