I'm trying to put a rule together to cycle through three scenes. I have very little experience working with RM so I'm not sure if I'm doing something dumb. This is what I have put together so far:
However, this rule doesn't seem to work. The problem is also quite inconsistent so I'm not sure what is going wrong where. If I set the scene to Daylight & hold the button, then it will activate Early Evening and immediately activate Late Evening. If I'm on Late Evening, it'll activate Daylight and then it all just breaks. The Groups & Scenes app doesn't seem to be updating scene activation, or RM doesn't seem to be communicating with the Groups & Scenes app properly. It thinks that no scenes are active despite me manually activating "Late Evening"; I can see this in the Apps:
Finally, sometimes multiple scenes get activated at once (so Daylight and Late Evening will show up as "On" even though that's impossible!)
Am I doing something wrong? Is there a better way to go about this whole ordeal?
Instead of closing the first if with an end if, continue the same one, and change the second and third ifs for else ifs.
It means that if the first was false, then the next one gets tested. If first one was true, the other two are skipped.
I don't have experience using the held function of buttons, but have you tested the rule using run actions instead of physically holding the button?
Might be a clue there
You are using a series of IF THENs, so each IF is evaluated when it is reached. You are performing an action in one IF that will make the condition you're testing for in the next IF be true by the time it is reached if that device's state has finished updating by then (may or may not happen every time, which explains the inconsistency). If you want only one block, the first matching one, to run in an IF block, I'd do this instead:
IF (Daylight is on) THEN
Activate scenes: Early Evening
ELSE-IF (Early Evening is on) THEN
Activate scenes: Late Evening
ELSE-IF (Late Evening is on) THEN
Activate scenes: Daylight
END-IF
That being said, the community app Advanced Button Controller mentioned below also has this functionality built-in and might be easier to set up, though I think it will go alphabetically instead of in any specified order.
(EDIT: So...what MrPancake said above and I missed before. Oops! )