Exact same IF statement shows different outcomes?

So maybe I'm missing something (wouldn't be the first time), but why does the exact same IF statement show different outcomes? I copied and pasted the second IF statement from the first, so why are they showing different outcomes?

It's probably just a transient UI artifact. Look at the Conditions associated.

Im not really sure what you mean? I triggered some of the conditions

and it hasn't changed.

my guess its evaluation in order like any language and since outter if is false never even bothers to update or evalulate the inner if.. but just a guess

The rule doesnt work either - yet I have an almost identical rule for my Daughters room that works as intended.

The non-working rule is using the same conditions but giving 2 different results:

It's like the conditions broke when I copied them.

missing an endif in first rule

actually 2 endifs

They are simple conditions, so don't need one:

1 Like

the first part of the second if is also not necessary but that probably is not the issue.

True, but I was just trying to make 100% certain I wouldn't annoy my daughter or wife by the lights turning off while they were present in the rooms. :rofl:

Open Manage Conditions and post a screenshot.

The ones in the red box were created by copying the 1st IF statement, the last one I just re-created:

Ok, I can confirm, the conditions copied / pasted were broken, not the rule. All I had to do was edit each unresponsive condition (add then remove a space from the string) and now they all work:


So, it sounds like a bug in copy/paste. Can you tell me where you copied from, and where you pasted?

1 Like

Sure - from #1 to #2. I then moved #2 from the bottom, up the order to its present location, and added the extra END-IF.

EDIT: I was able to replicate this issue in a different rule - it's only conditions using a string comparison that break.

1 Like

I happened to do my first copy of a couple If-Then blocks in one of my rules last night, and I noticed the corresponding 2 conditions were then duplicated in my Manage Conditions window.

I could reproduce the same thing in a separate (but similar) rule. Both are rules to deal with some ornery blinds, so I was just replicating a "refresh/try again if needed" block for additional redundancy.

For both rules, I just deleted the duplicate conditions and edited the copied If-Then statements to use the existing conditions instead.

ETA - I'm on latest beta and rules are all 5.1

1 Like