Rule machine: contact sensor

Hi,

I had a rule in webcore that would turn on a virtual switch when a contact sensor was closed and remained closed for 60 seconds.

For some reason it’s stopped working in webcore and I’ve given up trying to get it working!

Can I recreate this directly in rule machine?

If contact sensor is closed and remains closed for 60 seconds turn on switch A

Thanks !

1 Like

Use a 60 sec Delay with Cancel for the Action.

2 Likes

2 Likes

Thanks so much ! Will give it a go!

Where is this now, I cant find cancel. I can find stop. But not cancel. Has the terminology changed?

Under Actions for Switches, Turn off with after a delay pending cancellation. Only for Rules, not Triggers.

Sorry. I'm referring to the cancel action

I want an action to happen after a two second delay. After contact sensor has been open for 2 seconds, set private Boolean to true. This is to stop multiple messages whilst garage door is open.

I can't seem to find a way to have an action trigger after contact sensor is open/closed for a time period. Thought this example would be it, but "cancel" is not there as per the solution to the OP.

It's still there.

Ok, thanks. So solution is a virtual switch, not a private Boolean.

Correct. There is no cancel available when using Private Boolean.

1 Like

Bruce,

is there any chance of expanding the timers to include seconds (currently only minutes) for turn on/off pending cancellation?

@bravenel

Mike

Wrong! There is both delay and cancel on truth change available for setting Private Boolean. Private Boolean can always be used instead of a virtual switch, unless you need more than one for some reason.

You can do this with Delay These Actions. Allows seconds, and cancel on truth change. Even allows milliseconds.

Ok thanks for clarifying.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.