1) Give a description of the problem
Hi, i know i’m over complicating this but i’ve hit the wall through lack of experience. I want my goodnight switch to operate if there has been no motion for the last 30 minutes @ 10:45PM, or later if we’re still awake. However if there has been motion in the last 30 mins, then i want the timeline to keep rolling after 22:45 until there is a point of no motion for 30 minutes. eg, no motion for 30 min @ 23:57.
I don’t want to use a repeat timer because the piston will keep operating after the condition is met.
i’ve tried repeat loops but i think i’ve set it up wrong. Any help would be great. if you can doctor my piston and supply a code, that would be fabulous thanks
2) What is the expected behaviour?
A repeat loop keeps running until the last inactive motion was 30 minutes ago. Any time after 10:45 PM and beyond
3) What is happening/not happening?
i cant get my repeat loop to keep running until the Condition is met. i think i’m quite a way off the mark. Please can you assist in adding to my piston and retuning a new import code. Many thanks
4) Post a Green Snapshot of the piston![]()
(UPLOAD YOUR IMAGE HERE)
5) Attach logs after turning logging level to Full
(PASTE YOUR LOGS HERE THEN HIGHLIGHT ALL OF THE LOGS AND CLICK ON THE </> ICON TO FORMAT THEM CORRECTLY)
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.

