Simple Automation Rules: add ability to set global variable

There's some things Simple Automation Rules does much better than Rule Machine. For example, turn something on when any of a set of switches are turned on, Then turn the thing off when all the set of switches are off. Or turn on at a particular time and turn off at a second time.

One thing missing from Simple Automation Rules is the ability to change a global variable. I'd like to be able to change a global boolean to use as input into some Rule Machine rules I have.

Could you add that as something Simple Automation Rules could do?

I could, of course, just use Rule Machine, but it clutters up Rule Machine with things that could be done better elsewhere, and some rules (e.g., the one I described with multiple switches) are much easier to maintain in Simple Automation Rules than Rule Machine.

Tagging @bravenel in case it is something that he thinks would be worth the investment in time to implement.

Can I guess his answer?

"I could but then this would cease being Simple Automation Rule." Or something along that theme. :grinning:

1 Like

The entire premise of the SAR UI is that you first select a switch, dimmer or bulb that you want turn on or off. So how the heck does setting a variable fit that? What's wrong having a simple RM rule that sets a variable?

RM can do both of these quite simply:

For the first, the trigger is any of the set of switches turning on, and after the action to "turn something on", Wait for Conditions for all of the switches to be off, followed by turning off the something.

For the second, Trigger at the first time, and after doing whatever, Wait for the second time, then do whatever.

^^^ what he said too


Yeah, I've already progressed past this to using RM for it all and I see your point (mostly).