Rule engine: Set color: Set color by numerical value

Doing it through a single setColor() command with a single variable isn’t officially supported, but I just tried with a few devices and it seems to work. Officially, the setColor() command in SmartThings requires an object as the first parameter with hue, saturation, and optionally level properties.

We have Text, True/False, and Numeric variable types… but notably missing is an ‘Object’ variable type which is why I say it’s not officially supported.

That being said, I tried using a Text variable with the proper object formatting mentioned further up in the thread and to my surprise, it worked… so SmartThings might be doing some special processing of the arguments.

My test rule was just a single setColor() command with my specially formatted variable:

The rest of the details are covered in the notes by James further up in the thread, but if you have specific questions, feel free to ask! :slight_smile: