How to Substitute One Routine with Another Effectively?

Hi Everyone, I’m Emmanuel Katto from Uganda, I currently have a routine on my motion sensor that activates my lights for a specific duration, but only when a virtual switch called ‘Override routine’ is off. However, when this switch is turned on, I want to temporarily disable the routine and then re-enable it once the switch is off again. I’ve attempted to set the routine to trigger only when the switch is off, but if the routine starts before the switch is turned on, it continues running despite the switch being activated. Any suggestions on how to manage this scenario effectively?

Emmanuel Katto Uganda

Screenshots would help.

You’ll need a second Routine that triggers when the virtual switch comes on and then negates the actions of the first Routine. There is no way to stop a Routine that has already been triggered. Additionally, there is no automated way to actually disable a Routine.