I converted all my rules over to 5.1 (OCD), but still don't trust the ELSE part of IF-THEN-ELSE.
My IF-THEN statements work perfectly, and I just add a second IF-THEN with a .not. or some other condition that gets me there.
My rules would be a lot simpler (cleaner, more efficient?) if I could just add that ELSE and remove most of the subsequent IF-THEN (with .not.) code, but I can't.
Every time I try, the rule fails to execute reliably. I go back to my two IF-THEN statements, and 100% solid. Hmmm.
First of all, has anyone else been struggling with this? Are there things to watch out for? Is this a bug?
I have not tried an ELSE since converting everything over to 5.1. Perhaps 5.1 has addressed the issue?
I use if/then/else all the time and have never found any bugs in its basic functioning. Doesn't mean there isn't a bug in a specific use case of course.
Can you post a screen shot of a rule that uses if/then/else and maybe describe what you're trying to do?
So that we don't keep this discussion on the hypothetical level, a few screenshots of your existing Rules might be in order. Extra pairs of eyes never hurt, and you never know... someone might pipe up with something unexpected like, "Hey, you're missing an END-IF" or some other speck of housekeeping that's bollocksing up your workflow.
If the IF statement is false at the time the rule is triggered it will execute only the ELSE portion. So if you were to run the rule actions right now (bypassing the trigger) it would turn off CR Nanoleaf, Computer Room Fan, and Computer Room Lights.
I've never noticed any problem with the else... BUT if you had some logical issues you didn't realize, I could see things happening that you didn't expect, especially if you have IF conditions with multiple pieces to the IF condition...
It might be quite possible to have two statements that can be true independently so that they both happen, but switching to else would mean that only one or the other but not both could ever happen.
I switched over all my applicable rules (that had double IF-THENs) to IF-THEN-ELSE. I'm very careful to terminate my IF-THENs with ENDIFs. I just put in the ELSE, and removed the redundant ENDIF and IF-THEN statements.
Let's see if things remain stable :-).
I just had to get over my fear of ELSE, and hear from the community that my fear of ELSE was groundless.
I will miss seeing the "TRUE" in one section and "FALSE" in the other which you get with two IF-THENs.
Those triggers are most likely good since you used the *changed" as the trigger, some people misuse the True or False as the trigger instead, and expect a different outcome because the action part will never go to the else (flase) part because the trigger is set to run when true only.