Keep switch on while motion is active


Hi all…This is probably a simple thing I’m overlooking as I am new to webCoRE…I have a piston that turns on a switch when there is motion, and then turns it off after 60 seconds. It was not working at all then I figured out I needed task cancellation policy set to never.

That got me thinking…How can I keep the switch on as long as motion is active then turn it off after x seconds of no motion?


I see you figured out how to add your image. If you press the green camera button and save that to your desktop, that image is usually best.

Looks like you have two motion sensors? If so, you could combine them into one trigger simply by selecting both in the condition.

Anyway, to accomplish what you asked, you can remove the ‘wait’ and ‘off’ commands from where you have them now and then add a second if at the top level for ‘remains inactive for x seconds’ and place the off command there.

If you search around the community here you will find lots of examples of light controllers doing exactly what you describe.


This is the way I do that:

IF Motion changes to active
    Then Turn on lights

IF Motion stays inactive for 60 seconds
    Then Turn off lights

No TCP setting needed with this method.


Thank you both!