Having trouble creating a piston to control light

I need to create a piston that will turn on my front-door light when my Ring doorbell detects motion OR has the button pushed. I’m not sure how to create the or statement. Also, I’d like the light to turn off after 10 minutes.

Thanks for any help

Add an IF statement and add two triggers/conditions to it:

  • button gets pushed
  • motion changes to active

Once you added them, click on the and between them and change that to an or.

On the then branch, add an action, select the bulb, add a task, turn on, add another task, wait 10 minutes, turn off. That should do it :wink:

1 Like

Thanks, ady624.

I created the piston, and it seems to be executing, but the light doesn’t actually turn on. Any ideas?

click the trace button below your piston and you will get a better idea of what is working/not working. Also, just wondering if you try removing the motion is active line as a test to see if your piston will work

So, I changed it from ‘motion is active’ to ‘motion changes to active’, and that seems to have made the light go on. Now the problem that i’m having is that it doesn’t turn off after 10 minutes. I turned on the trace, and it shows the timer counting down from 10 minutes, but it seems like once the sensor goes back to inactive, it cancels the countdown.

One way is to add qualifications for the ELSE statement

IF Motion Sensor changes to Inactive

THEN

With Light 1

Do
Wait 9 minutes (excluding the minute for motion sensor to change from active to Inactive)
Turn off

Thanks, WB70.

It seems like having the ‘or’ condition to include if the button is pushed was messing things up - not sure why. I took that out, just assuming that the motion would pick anything up before the button gets pushed anyways, and I added the else statement you suggested. Now, all works well :slight_smile: