09-06-2023 01:12 PM - edited 09-06-2023 01:13 PM
I would very much like the ability to set an automation that turns a camera to On when a smart lock is set to Locked. This would be very useful as you do not want your rear patio camera on all the time recording your own movements in and out of the back door. If the camera came on automatically when the back door was locked, the patio would then be constantly monitored when no one was using the back yard. Currently a camera can only be used as an automation starter by using a range of times.
09-06-2023 03:24 PM
Hey @MSN - This automation should be possible. You'd need a device state starter for your lock and a device OnOff action. Full list of supported starters, conditions, and actions can be found here - https://developers.home.google.com/automations/starters-conditions-and-actions
OnOff snippet below:
- type: device.command.OnOff # Turn the device on or off.
on: true
devices: Entryway camera - Entryway
09-07-2023 08:26 AM
That worked! Thank you so much! I wasn't familiar with writing scripts ... I was trying to do it through the app and it wouldn't let me. In the end I used type: device.state.LockUnlock as the starter. This has opened up a whole new world to me 🙂
09-07-2023 08:51 AM
Awesome! I'm glad to hear it worked! You can check out more details about what's possible with our help center documentation and corresponding reference documentation .