Delay for no motion


(Stan ) #1

I successfully set up my first Piston to turn on my bedroom lights when there’s motion between certain hours. I set up a second to turn them off when there’s no motion during the same hours. The second one works too well. It turns off the lights right away but I would like to have a delay of at least 30 seconds. My issue is that I don’t see anywhere to set that delay. I want something like “no motion for 30 seconds then turn off the lights”. How do I set a no motion delay?

Thanks
Stan


(might be my fake name?) #2

Try something like this.

Make your piston type simple not basic. You can accomplish everything with one piston. (My refresh commands aren’t necessary. Ignore those.)


(Lee Florack) #3

I use this for the same use case (change the delay as desired):


(Stan ) #4

OK, I tried doing what was suggested. It seemed to work in CoRE but in reality, the lights go on great but instead of the 2 minutes I have set, they turn off in 15 seconds. Is there some delay in getting the piston on to the ST cloud for it to actually run? This is my new piston:


(might be my fake name?) #5

Put your two actions 1) wait and 2) using Maryann’s Light under the same action. Like this:


(Lee Florack) #6

Your wait and turn off actions need to be in the same “using” group. Each using group starts at the same time. So, therefore your “turn off” action has no wait associated with it. and executes immediately. If you put your two actions in the same group, the actions will run sequentially.


(Stan ) #7

Thanks for the suggestions. I followed your advice and it works. And the best part is that my wife even likes it!

Thanks again for the help!!!