[C7-2.3.2.124] RM5.1 Rules - Custom Attributes Comparison Not Matching What Is Set - *Solved with Work Around*

I created a new rule where I set a wait for expression, bulb colorName = "value" and while the two show to be the same the expression is shown as "[FALSE]" Then I tried bulb colorName contains "value" and the same thing, shown as "[FALSE]". I even copies/pasted from the device page.

I decided to run the rule but had to disable the Wait for Expression otherwise it would have waited for the timeout.

After running the rule I opened it back up and it still showed the same thing. I decided to capture some screenshots and post to see if this is a bug or if I am doing something wrong.

Log:

Debug Logs on device:

Logic:
App_BirdLight_Logic

Device Status:

Thank you for looking at this.
RL.

[Edit, added screenshot of device status]
[Edit, added screenshot of device debug logs]

I will take a look.

I added the device debug logs, just in case those may be needed.
Thank you for taking a look.

I know exactly what is wrong, and how to fix it. Funny thing is that the code involved was copied into Room Lights, and I had the same problem. One of my associates found the problem in my code, which is a hidden blank at the beginning of the string value you are trying to compare. That got fixed in Room Lights, but not in Rule 5.1.

The fix will be in the next release. Meanwhile, if you look real close at the place where you enter the string to compare to, there is a leading space. Place the cursor in that field, and hit backspace. Then type in the string value.

Before you type backspace:

Screen Shot 2022-06-10 at 9.08.35 PM

After:

Screen Shot 2022-06-10 at 9.08.42 PM

3 Likes

I can confirm this was the issue.

After following suggestion of hitting backspace:

Thank you!
RL

2 Likes