Custom component for lovelace to be used as a panel for viewing security cameras.
Note: When including this file in your ui-lovelace.yaml
you must use type: module
Name | Type | Description | Default |
---|---|---|---|
type | string | custom:surveillance-card |
Required |
cameras | list | See camera section below | Required |
thumb_interval | number | Update interval for thumbnails in seconds (min 0.5) | 10 |
update_interval | number | Update interval for main image in seconds (min 0.5) | 1 |
focus_motion | boolean | Switch to camera when motion detected | true |
Each entry in the camera list takes the following options
Name | Type | Description | Default |
---|---|---|---|
entity | string | Camera entity_id | Required |
motion_entity | string | entity_id of a binary sensor to use for motion detection (uses state=='on' as motion detected) | none |
Install surveillance-card
by copying surveillance-card.js
from this repo to <config directory>/www/
on your Home Assistant instance.
Example:
wget https://raw.githubusercontent.com/custom-cards/surveillance-card/master/surveillance-card.js
mv surveillance-card.js /config/www/
Link surveillance-card
inside you ui-lovelace.yaml
.
resources:
- url: /local/surveillance-card.js?v=0
type: module
Add as custom card of a panel view in your ui-lovelace.yaml
using type: custom:surveillance-card
views:
- title: Surveillance
icon: mdi:cctv
panel: true
cards:
- type: custom:surveillance-card
thumb_interval: 15
update_interval: 2
cameras:
- entity: camera.front_porch
motion_entity: binary_sensor.front_porch_motion
- entity: camera.back_yard
motion_entity: binary_sensor.back_yard_motion
- entity: camera.driveway