HI, i've tried this same rule with a private boolean and also a variable but i have the same issue. Once all of my lights turn off, the boolean does not turn back to true. What am i missing here?
So basically i have an aqara wall switch and i want any of the buttons to turn all 3 lights on in the 1st press. But after the first press i want the buttons to toggle as a normal light switch would. Once all lights turn off, the process begins again when any button is pressed.
Also as a side isue, this rule turns my light on and off twice as slow as when i have a basic IF/THEN statement. Is there a way to speed this up? Have i overcomplicated the rule. (i'm fairly new from ST and webcore and i'm not a teccy, nor do i understand the logs) Please help
I'd say so. Why do you need to put all of this into a single rule. You have three basic actions, each in response to a specific button push. Why not just 3 simple rules, each with a single button as trigger? No need to have all of those conditionals. You could do this easily in Simple Automation Rule, one for each button. Or, use Button Controller, one action for each button.
I appreciate your comments. Even though you say I can simplify this, I'm also using it to build my knowledge and understanding of RM. So I guess I'm still trying to work out why the PB doesn't change at the end of the rule. Any advice would be appreciated. Also, any of the 3 buttons pressed turns all 3 bulbs on. After that, the buttons work independently per bulb until all 3 bulbs are all off. How could I facilitate this with button controller. Cheers for your help in advance
You could greatly simplify your Rule. Keep your Triggers as-is.
Maybe change your actions as follows
IF (Private Boolean is False) THEN
On: SPOTLIGHT KASPER 1, SPOTLIGHT KASPER 2, LAMP KASPERS
Set Private Boolean True
ELSE
IF (LIGHT SWITCH KASPERS pushed() = 1) Toggle SPOTLIGHT KASPER 1, SPOTLIGHT KASPER 2
IF (LIGHT SWITCH KASPERS pushed() = 2) Toggle LAMP KASPERS
IF (LIGHT SWITCH KASPERS pushed() = 3) THEN
Off SPOTLIGHT KASPER 1, SPOTLIGHT KASPER 2, LAMP KASPERS
Set Private Boolean False
END IF
END IF
There are many ways to approach this, including the use of Hubitat Groups, using Simple Automation Rules, etc... But, since you asked for a RM example, I am hoping that this might help a little. Note: I have not tested this, but it should be close to what you've requested.
Honestly I am unsure, but it is a syntax error and I noticed you had an error in your logs. I would give it a try and see if you get the expected behavior.