How to use Rule Machine to keep switches off

I use modes to make my exterior lights come on at ”Evening” and off at ”Night”. When we go “Away” (set by presence Sensor) the lights go off and stay off until we return.

While on vacation recently, I noticed some lights on while we were gone (saw them on with the security camera). They came on digitally. I think the wife accidentally hit the shortcut on her phone.

How do I use RM to not allow lights to be turned on while in “Away” Mode. I’ve been able to set up RM to turn lights on or off as modes change, but I don’t see how I can set it up to keep them from turning on at all (accidentally). Any suggestions?

In Rule Machine under capture/restore, device refresh.... you will find device disable and enable.

In Rule Machine, you can use a Required Expression of mode NOT Away. When the mode is Away, the Req Exp will be false and the rule won't trigger.

1 Like

That will stop a rule triggering. However I think he’s asking how to stop them being turned on accidentally (manually from dashboard)

This will not solve what you are asking about but I have the following setup when I'm away to periodically turn off any lights that may have come on while I am gone. I did this for some bulbs that turn on when power is restored after an outage:

This would at least get them back off for you.

Required Expression
Mode is Away

Trigger
(list of lights) any turns on

Actions
Off: (list of lights)

The lights could still be turned on, but won't stay on for more than a couple of seconds.

4 Likes

This seems like the simplest way to accomplish the OP’s goal to me.

If it were of critical importance to prevent the lights from turning on even momentarily for some reason, the only way I could think of would involve adding some virtual switches/dimmers. But that would then require a rule (or rules) to sync the virtual dimmer with the real dimmer, except while in away mode, and to use the virtual dimmer on the dashboard.

Possible, but much more complex and for a questionable benefit at most (IMHO).

Thanks! This solution works excellently. I set it to turn off lights that are turned on digitally. That way if someone is turning on the physical switch while we are gone (dog sitter), it won’t turn them off.

2 Likes

When I read that I was thinking the shortcut was an endpoint trigger on her phone.

1 Like

One thing to keep in mind is the trigger for physical vs. digital activation of the lights isn’t always foolproof.

It depends on whether the specific device accurately reports physical vs. digital. Many devices do, but some don’t.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.