a rule that resets the color and intensity when state changes from OFF to ON (normal operations)
a rule that sets the lights to a specific scene (colorfull party mode )
But now when I call rule 2, rule 1 immediatly resets the pary mode tot the default settings. After that I need to run the party mode again, to keep the colors (at that point the state doesnât change).
How can I make sure that rule 1 doesnât kick in when rule 2 is called when the lights are off?
Hi,
how do you trigger rule 2? With an item?
If yes then add to your first rule as a condition (âbut only ifâ) your party mode item is OFF. So when your item state changes to ON, but the party mode item is ON too, then the rule 1 wonât get fired.
I would try to solve this problem with an additional Item. Add a switch Item eg âparty modeâ.
Rules like this:
Rule 1: When Hue state changes = send command depending on state. If item is OFF send ON, if item is ON send OFF. BUT only if âparty modeâ = OFF.
Rule 2: When item âparty modeâ changes to ON = send command COLOR to HUE. When item âparty modeâ changes to OFF = send command OFF to HUE.
Thanks for that. You put me on the right trailâŠ
Next challengeâŠ
Next tot colorfull, I also have a rule âmovienightâ. I want to implement your solution as well.
But there is an overlap in lights for partymode and movienight.
So, Rule 1 would have 2 exceptions, but only if partymode is off OR movienight is OFF.
But it seems the âbut only ifâ is always an AND operator?
Just to be clear here because Iâm not sure itâs apparent.
The if statement @dirkdirk shows would need to be inside the Script Action.
If you want to set it as a Script Condition, you need to skip the if part. The last line executed by the Script Condition (Blockly or any other language) needs to evaluate to a boolean (i.e. true or false).