I have the lights in the guest bedroom controlled by a motion sensor via Rule Machine. Is like to be able to pause and resume this rule using a virtual switch commanded verbally via Google Home while at the same time- announce the fact that the rule has been paused or enabled. What I've created isn't working. It neither pauses the rule nor fires off message. Can anyone help me with the correct recipe to accomplish this? Here's what I have:
Change your second if to else-if then close it eith an end-if at the end of the rule. That's what stands out to me.
Because it is a virtual switch, you'll need to set up the trigger again using the regular 'switch' capability instead of 'physical switch'.