A question for those of you with color bulbs + SmartThings

For those of you with other bulbs like Philips Hue & Lifx, when you select your device in SmartThings, and then select the color wheel, is the wheel set to the current color or does it always default to the middle?

Cheers,

It depends on how good the devicetype code is and how the color was set. The color wheel position is controlled by an attribute called color in RGB hex format (same as what’s used to control tile background colors), but zigbee color bulbs like hue and Lightify use hue and saturation to set colors (not sure about Lifx). ST doesn’t convert new hue/sat values into hex format to update the color picker automatically, so the code would have to do that conversion and send the event to update the color attribute.

This is why color changes from SmartApps typically won’t update the color wheel. They’ll change the hue and/or saturation directly and not go through the setColor command or they will go through the setColor command, but won’t pass the color parameter used to update the color wheel position.

Color is complicated because there isn’t a universal format or color gamut across devices. Zigbee uses hue/sat, and I think Fibaro RGBW uses RGB values for instance.

2 Likes

Great, so it is possible to set the color wheel, provided you use the hex color code?

Do you happen to know what that sendEvent command would be, or what I could search for in the docs?

sendEvent(name: “color”, value: hexColor)

Where hexColor would be in the format “#RRGGBB” and the RR is the 2 digit hex representation of the red value 0-255, same for green GG and blue BB.

The docs are a little light regarding the color capability because it has so much variation. They also don’t have the color picker documented well.

2 Likes

Thanks @Sticks18

I have to type 20 characthers to say thank you, have you tried the <3 button?

1 Like