How do I disable a rule?

Okies I am starting to get my head around.
I have used Triggered Rules to discretely identify on/off actions on each device.
I am thinking that a Private Boolean would best sit in a Rule that encapsulates the virtual Prog switch.

SO can I define a single Rule that fires on ether the Prog switch turning either ON or OFF?
As you will see from the GuestSideProg-[ON | OFF] rules above they both set the Flag switch.

There is a restriction under each rule that allows you to disable the rule when it's PB is set. I've used this without requiring another rule to be the PB as you've shown. So in my case I had 2 rules. the first rule runs and sets itself to false then another runs and set's it back to true when needed.

Personally I think there are redundant features in RM when it comes to disabling rules. This can make the engine more confusing than it needs to be.

Hm........

So is it correct to say that a Private Boolean is a Boolean variable limited in scope to the rule in which it exists?

From what I have found a rules PB can only trigger or match a rule that it is defined in. However other rules can change the PB of any other rule. Does that make sense?

You can make it arbitrarily complex by manipulating multiple PB each change, but at a certain point, the use of a pseudo global in the form of a virtual makes more sense.

You know..... I never looked at a virtual switch as a sudo global variable. Interesting take.

A lot of people are using a virtual dimmer as a counter. You can "store" a number between 0 and 100. I've also heard of people setting the virtual dimmer to be the value of a dim sent to a real dimmer. Then later, you can compare the dim value of the real against the virtual. If it's different, then you conclude a human touched the dimmer switch as a signal to alter the outcome. Example... Sunset sets a room's dimmer to be 34% and the automation also sets the virtual dimmer to be 34%. Then along comes a person and, by changing the dim level even a tiny amount, makes it not 34% and thus the Automatic Lights off at X doesn't occur.

1 Like

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