"Turn on and Set Color" bug in Simple Automation Rules?

Greetings,

From my admittedly minimal testing, I think I've found a problem with the "Turn on and set color" action (new in 2.2.1) in Simple Automation Rules after a comment from an Inovelli forum member prompted me to try to replicate it. With an Inovelli LZW42 (color bulb) and this setup:

I can consistently replicate this error:

Error text for screen readers or people using the search function:

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '99' with class 'java.lang.String' to class 'float' (setColor)

This is with the built-in LZW42 driver, though the same appears when using Inovelli's custom driver and bcopeland's custom driver, but I think the device and driver are more or less irrelevant here: it looks like SAR might be sending the level as a String instead of a numeric type, based on both this error and the fact that this input gets saved as type "text" according to the app status. (Obviously, staff would have a better idea of this than me, so this is just what I'm trying to piece together.)

Tagging @bravenel since he will probably know if my guess above is correct and @bcopeland in case it isn't. :slight_smile:

Yes, Simple Automation Rule was mishandling the color level. Will be fixed in next release.

3 Likes

so I grabbed the new update .115 today that I think fixed the SAR application, not sure if it's the app or the driver now, but I get the following errors when trying to use the same command.

errororg.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '100' with class 'java.lang.String' to class 'float' on line 324 (setColor)

This was fixed. Simple Automation Rule is not using a string any longer to set level.

What driver is this?

Iโ€™m using the inovelli driver. Should I go back over there?

Open the app and reselect the level.

That's very interesting, seems to have fixed it up! Thank you @bravenel!

Your in-place setting was still a string, from when you selected it from the prior version. So, reselection is necessary to replace the string with a number.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.