Turn off cameras if anyone is home

This commit is contained in:
Thomas Lovén 2019-05-23 12:36:26 +02:00
parent b1b83a8a29
commit 151804e7a9
3 changed files with 21 additions and 7 deletions

View File

@ -1,5 +1,6 @@
{% set entity='"camera.barnrum"' %} {% set entity='"camera.barnrum"' %}
type: picture-elements type: picture-elements
title: Barnrum
image: /local/images/placeholder-1280x720.png image: /local/images/placeholder-1280x720.png
elements: elements:
- type: image - type: image

View File

@ -1,7 +1,14 @@
type: picture-elements type: picture-elements
title: Kontoret
image: /local/images/placeholder-800x600.png image: /local/images/placeholder-800x600.png
elements: elements:
- type: image # Only show camera feed if noone is home
- type: custom:hui-conditional-card
conditions:
- entity: binary_sensor.home_occupied
state: "off"
card:
type: custom:hui-image-element
camera_image: camera.kontor camera_image: camera.kontor
style: style:
left: 50% left: 50%
@ -15,10 +22,10 @@ elements:
action: none action: none
style: style:
left: 50% left: 50%
top: 0% top: 25px
height: 100px height: 50px
width: 100% width: 100%
background: rgba(0,0,0,0.3) background: rgba(128,128,128,0.3)
- type: state-icon - type: state-icon
entity: light.taklampa_kontoret entity: light.taklampa_kontoret

View File

@ -1,7 +1,13 @@
type: picture-elements type: picture-elements
title: Vardagsrum
image: /local/images/placeholder-800x600.png image: /local/images/placeholder-800x600.png
elements: elements:
- type: image - type: custom:hui-conditional-card
conditions:
- entity: binary_sensor.home_occupied
state: "off"
card:
type: custom:hui-image-element
camera_image: camera.vardagsrum camera_image: camera.vardagsrum
style: style:
left: 50% left: 50%