Display the Nest Doorbell camera on the TV when the doorbell is pressed
The Nest Doorbell push notifications are really annoying, and I've turned most of them off, but it is still useful to be able to see the front door camera - especially when someone has pressed the doorbell button.
In this automation I show you how you can display the live doorbell camera stream on your smart TV when the Nest doorbell button is pressed. If you use HDMI CEC your TV will automatically switch to the Chromecast input and display the live doorbell footage, allowing you to see who is at the door.
To create this automation you will need:
A working Home Assistant installation
A Smart Television that is integrated with Home Assistant and allows you to detect if it is on or off. I have an LG Smart TV that does this.
A Nest wired doorbell connected to Home Assistant.
A Chromecast device, plugged into the same TV and connected to Home Assistant.
Trigger
This automation is triggered when the doorbell button is pressed. If you've integrated the doorbell using the instructions provided by Home Assistant, you will see that the device exposes a trigger for this.
platform: device
device_id: 9e8f626e9a62616bb25d6f057b129358
domain: nest
type: doorbell_chime
Conditions
I only want this camera stream to be displayed if the TV is switched on, so I use a state condition to check for this.
The condition in YAML:
condition: state
entity_id: media_player.living_room_tv
state: 'on'
Actions
Home Assistant enables you to live stream a security or doorbell camera to a Chromecast device using the camera.play_stream service. The action of this automation uses the Call Service action to stream the doorbell camera to the chromecast device.
Full Automation in YAML
alias: Show Front Camera on TV if Doorbell Pressed
description: ''
trigger:
- platform: device
device_id: 9e8f626e9a62616bb25d6f057b129358
domain: nest
type: doorbell_chime
condition:
- condition: state
entity_id: media_player.living_room_tv
state: 'on'
action:
- service: camera.play_stream
target:
entity_id: camera.front_door
data:
media_player: media_player.lounge_room_chromecast
mode: single