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.
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.