Core piston override

Hey. I have this core piston that turns off the lights if there is no motion for 5 minutes in my living room. If one of the motion sensors is the triggered, another piston turns the lights back on.

My issue is that when the light turn off, there is a 30second delay (approximate) where, if there is motion in the living room again, the lights will not turn back on.

What should I do to solve this?

use smart lighting for motion=light, found in ST Marketplace
its local
doesnt use the cloud(that delay)
only use CoRE to turn on and off lights if motion+condition=light

What I mean is not the time it takes for CORE to react and act but that, when a piston is triggered there is about a thirty second peridod where, if any other piston it triggered, nothing will happen.

Here are screen shots between my two pistons:

update to the latest version

Have you tried breaking up the code into two? Have one piston test and the other fire. Set the second piston up just as a DO. That way, I believe, if you re-enter within the 30 second period you are stating as your timeout to occur on the motion sensor device, a new call to this DO piston will fire off fresh. Worth a shot.

After playing with this a little more, I think you might benefit by using ‘Capture state of attributes’ and ‘Restore state of attributes’. Before you do anything with a light you capture the state, say it’s level and switch state. Then someone walks into the scene and a light turns on. When that motion sensor turns off, then ‘Restore state of attributes’ to turn things back to the way they were. See if this helps.

Check out my piston that captures states and restores them:

Case Study - Buglight (Capture and Restore State)

1 Like