Which is faster: Virtual Button, or a global variable?

I have a rule that currently uses a virtual button to override motion detection for a light switch on the outside of a room ('50s bathroom).

Ideally what would happen is that if the Lutron dimmer light switch is triggered on using the switch, the virtual button is set to on, and it overrides the motion turning on the light when the room is entered.
This works sometimes... what usually happens is that the light switch is turned on, then someone enters the room, and motion is detected, triggering the light switch to be dimmed to 30% from whatever was set on the Lutron Switch.

I would love for this to work more like 90% or gasp, even 100% but so far no luck.... was thinking maybe switching out the virtual switch for a global variable? Thoughts?

My rule of thumb is that if it's a rule that is triggered frequently or relies upon fast evaluation always use a "virtual switch" as opposed to a "global variable". Every interaction with a global variable requires a call to RM's parent app which is much slower than using a virtual device.

However, assuming you are using RM for the motion lighting rule, you may be able to achieve the same goal using a private boolean. Perhaps you could show a screenshot?

2 Likes