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.
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.
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: