I’m trying to create a piston to control integration between my Ring doorbell and my front lights. What I’m looking for is:
- Turn on lights when doorbell rings between sunset and sunrise (ie front hall and porch lights)
- Wait X minutes
- Turn off lights ONLY IF front door has not opened since doorbell ring
So far I’ve got the piston set to turn on the lights when the doorbell rings (between sunset and sunrise), and turn off X minutes later, but I’m not sure how to add the condition to leave the lights on if the door has opened. The thought behind this is that if the front door has opened, then someone answered the door I don’t want to automatically turn the light off on them. Using a home/away mode could work, but I want the light to turn off if I’m home but didn’t answer the door.
To make it a bit more fancy, I’m thinking of adding another random wait time into the piston to delay the light turn on (so it’s not instant and seems more like someone is home).
One more step of fancy-ness is that eventually it will also be changed to utilize the light sensors throughout the house such that the light only comes on if it’s dark enough (based on specific threshold) as opposed to tying it to sunrise/sunset.