How can I prevent a rule from being re-triggered for a period of time?

I have a button assigned to a relay to open a garage door. If the button is accidentally pressed twice, the garage reverses direction. How can I inactivate the rule or the button for a short period (30 seconds?).

Thanks
Bob (a noob)

I do it with a variable that specifies if the rule should run, using that variable as a condition to determine if the rule should run. I do this when I don’t want something like a circulation pump to trigger too often. Your case is really just a de-bounce, but this approach should work.

  1. Create a boolean (true/false) variable (DoorShouldOperate, for example) and set it initially to True.

  2. In your rule’s IF statement, add DoorShouldOperate is True (and ensure the rule specifies ALL conditions).

  3. In your rule’s then statement, add Set Variable DoorShouldOperate value to False after your main action line.

  4. Create a second rule to reset the variable. IF DoorShouldOperate changes to False, THEN Delay for a couple seconds (or however long you need to prevent a second push) and then Set Variable DoorShouldOperate to True

1 Like

Excellent- thank you.

1 Like