Show a message on the TV when the Nest doorbell detects a person

I have a Nest Doorbell and the camera on it has the ability to detect if a person is in front of it and send you a push notification via its mobile app. The app push notifications are really annoying, and I’ve turned most of them off, but it is still useful to know if someone is by the front door – especially when I’m waiting for some food to be delivered.

In this automation I show you how you can show a message on your smart TV when the Nest doorbell detects a person by your front door.

To create this automation you will need:

  1. A working Home Assistant installation
  2. 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.
  3. A Nest wired doorbell connected to Home Assistant.

Trigger

This automation is triggered when the doorbell detects a person. If you’ve integrated the doorbell using the instructions provided by Home Assistant, you will see that the device exposes a trigger for this.

Home Assistant screenshot showing the automation trigger using the Nest Doorbell Person Detected trigger
Or in YAML format. You will need to replace the device_id with the one for your own Nest doorbell.
platform: device
device_id: 9e8f626e9a62616bb25d6f057b129358
domain: nest
type: camera_person

Conditions

I only want this message to be displayed if the TV is switched on, so I use a state condition to check for this.

Home Assistant screenshot showing a conditon that checks if the TV is on
The condition in YAML:
condition: state
entity_id: media_player.living_room_tv
state: 'on'

Actions

The LG TV that I use exposes a notify service that displays a text message on the screen. I use the Call Service action to call this notify service and send the TV a message to display.

Screenshot of Home Assistant automation action that sends a text message to a LG smart TV

Full Automation in YAML

alias: 'Notify: Notify on TV is Person is Detected by Doorbell'
description: ''
trigger:
  - platform: device
    device_id: 9e8f626e9a62616bb25d6f057b129358
    domain: nest
    type: camera_person
condition:
  - condition: state
    entity_id: media_player.living_room_tv
    state: 'on'
action:
  - service: notify.living_room_tv
    data:
      message: Person Detected at Front Door
mode: single