Just starting to get comfortable enough with Rule Machine to enjoy it. But not comfortable enough to REALLY know what I'm doing. I created a rule that says at 8PM on these days dim lights 1, 2, 3, 4 & 5 to level 0 over 5 min. My problem is if light 4 is already off the rule turns it on so that it can dim it. I can't think of a way to add a condition that says "don't change lights that are already off." If I make it an IF the lights are on THEN dim, I would have to make an IF statement for each light right? Or the rule would only work if all of the lights were on. Make sense? Thanks in advance for any help.
It depends on how you write the rule. Either way is possible--but if you want to evaluate each light individually, you will indeed need an individual condition for each light. Something like:
IF (Light 1 is on) Dim: Light 1 to x% over y minutes
IF (Light 2 is on) Dim: Light 2 to x% over y minutes
or, if a simple conditional isn't enough, the more verbose but more powerful:
IF (Light 1 is on) THEN
Dim: Light 1 to x% over y minutes
END-IF
IF (Light 2 is on) THEN
Dim: Light 1 to x% over y minutes
END-IF
...and so on.
As an alternative, I'd be curious how a setLevel(0,300)
command would work with your bulbs (i.e., dim/set level to 0 over 300 seconds), which you can test from the device page. If that does what you expect (the 300 seconds thing is a bit long but i don't know what most bulbs' maximum times are here) and doesn't turn on any bulbs that are currently off (setLevel
normally does, but 0
is usually an odd case, synonymous with off()
in some drivers--and another reason this might not work with the transition time), then you might be able to get away with just sending that command to all bulbs without checking anything first. But just a wild guess, and also dependent on your device and driver.
Thanks. It's a bummer that I will have to create an IF/THEN for each light, but I'm also glad I wasn't missing anything and my assumptions were right. I will test the set level command and reply if it works. I appreciate the help!