Doorbell sensor rule using local variable

I have a Sage doorbell sensor and I'd like it to send me a text and turn ON a switch once the doorbell is pushed and then turn off the switch after a minute AND only in Day mode. I'm not familiar with local variables but is that I would use to allow the Rule only to work in day mode?
I have no problems creating the rule OTHER THAN only occuring in DAY MODE .

Also this same switch is used in my AWAY mode and want to make sure the rule doesn't affect the switch while in AWAY mode.
Thank you for any help in setting up this rule

Something like this should work. You don't need to use a variable. Just test for the current mode. You might need to move the 'Cancel delayed actions' around depending on how you want the rule to perform. You actually don't even need the cancel. That is just there if you want the delayed off to be reset if they push the button again.

1 Like

Great!. So this will not affect that switch if mode changes to away and doorbell rung?
Thank you soooooo much
Tony

It may if someone rings the bell and during the one minute delay the mode is changed to Away. In that case the light would still go off. If you are concerned about that you could add some logic to say IF mode = AWAY THEN do stuff, EXIT RULE. Is this a concern for you?

Truthfully I really want to make sure that while set to AWAY , the switch stays on as per my HSM rules. I'm not concerned about a minute or two delay. Guess I'll just follow your rule and try it out. Thanks so much again for your followup.

There are a bunch of ways to write this rule but this should cover your use case. The IF Mode Away is a 'Simple Conditional Action'

Your the BEST! Much appreciated