Template Sensor for Nest Motion Detection

The Nest SDM integration sends events for the various motion/person/sound detection features. A lot of other integrations need a motion entity to correctly trigger. Hopefully this is useful for someone else to create a binary_sensor motion template that triggers from nest events.

- trigger:
    - platform: device
      device_id: 963e2557b52f6630df2a3a9d883fe25f
      domain: nest
      type: camera_person
    - name: "Front Porch Person Motion"
      unique_id: nest_hello_person_motion
      state: 'on'
      auto_off: 5
      device_class: motion

You can change the auto_off duration to decide how long the motion trigger stays on after the event is received.


Thank you for sharing as this is a very common request.

1 Like

First of all, thanks for this @EricD183 I used the sensor for person and it s working fine. I have some nest cameras over our garage, and I plan to use them for geofencing, when we arrive home etc (in a car). However when I use camera_motion, and we come home in a car, the automation/sensor doesn’t work.

I guess that is a limitation of the SDM API? Since technically its not a motion event, but a car event?

I believe the API only emits person, sound, and motion events: https://developers.google.com/nest/device-access/traits/device/camera-person

I’m not sure how these map from the Nest app to the API. I did some looking when I was trying to see if I could use one of my Nest cameras to data-log my neighbor’s barking dog. Even though the Nest app shows me Dog Bark events that level of detail isn’t in the API.

Ye I have the same experience after testing all day.

I had a simple automation when we arrived home and if the binary sensor nest motion saw anything turn on x. That didn’t work when we arrived in a car.

I also had a similar automation that If the nest binary sensor person motion saw us turn on x. That worked if the camera could make out a person in the car.

I tried tricking the api. And turned of all events expect motion in the Google home app. No car, person, animals etc. but didn’t help.