Add a Virtual Switch to cancel piston?


#1

I have a contact sensor on my garage door, and also a z-wave relay switch to close the door.
This simple rule will close the door after X minutes (5 in this example).


How can I add a virtual switch (or any other method) to cancel the automatic closing of the door after 5 minutes?
In Rule Machine I was able to use a “Disable door relay” virtual switch, activated from my phone, to stop the automatic closing if I want it left open.

Any assistance would be greatly appreciated.


#2

IF
Contact Sensor 1’s contact IS open
AND
Virtual Switch 1’s Switch IS off
THEN
with switch 1
wait 5 minutes
turn on

Or if you use a momentary switch:

IF
Contact Sensor 1’s contact IS open
THEN
with switch 1
wait 5 minutes
turn on

on events from Virtual Momentary Switch 1
DO
with location
Cancel pending tasks#

I prefer the second method as you don’t have to reset the switch when you’re done.


#3

Robin,

Thanks

The 1st option works well for me.