In my carport i have a Nest camera and some Philips Hue lights.
Is there a way to use the camera as a motion sensor?
I can use the nest event as a trigger to power the lights, that is not the issue.
This is not a simple task, but not impossible either.
Event triggers are instantaneous and do not have states you can trigger on by them being in a particular ‘state’ for any length of time.
Assuming you want to turn off the lights there are a number of ways to do this:
Trigger on the lights being in the 'on' state for x minutes, and turn them off in the action. The problem with this is that the for ‘timer’ will not reset when more motion is detected. It is simple though and may fit your need.
or
Use an actual timer and a couple of automations. Start/restart the timer using an automation triggered every time the movement event occurs. Another automation that is triggered by the timer.finished event switches off the lights.
or
Create a triggered binary sensor. The trigger is your camera movement event. The state is is just 'on' (true), use the auto_off, option to turn off the binary sensor after a second or two. Then an automation uses a state trigger watching for this binary sensor to be 'off' for x minutes, then turns off the light. The for time resets every time there is movement and the binary sensor turns on.
To me, option 3 is the best as it offers the required functionality for the smallest amount of configuration.
I did. I also got an error that there is something wrong on line 1. I no longer see the message and checking the config works so not sure what’s causing it to not work.