Scenes: RGB isn't actually RGB

I want true RGB settings but when I create a scene and capture it, I get color temp and level. Then I change to RGB and it gives me Hue and Saturation. Where are the actual RGB settings?

Our drivers don't currently support RGB as an input parameter in the setColor commands.

Then I suppose it should at least be named HSL instead of RGB so it's not misleading and confusing.

2 Likes

maybe, but that's a bit redundant given we have them as separate events already.
At some point we will probably add support for RGB directly...

Mike, the driverCapabilityList shows an attribute RGB. Is believe (but you would know) this supposed to be the RGB value? I assume that many devices do not yet support the RGB attribute.

paul4. HSL is reported as separate hue, saturation, and level. RGB is a separate, recent added attribute that is not necessarily supported by all devices (it will take time for this change to promulgate through the various device drivers).

paul4. To capture color for future use, create a color map that will then be an input into the setColor command. Definition : [hue*:(0 to 100), saturation*:(0 to 100), level:(0 to 100)]. Example: [hue: 44, saturation: 99, level: 55]. (I do this in one of my drivers as a map of state of colors name; i.e., [red: {RED MAP}, blue: {BLUE MAP}] and can then command color by name in a custom command.)

2 Likes

How do I create a color map in HE?

Rule machine or driver?

Driver example (as state):

def psData = [:]
psData[hue] = device.currentValue(hue)
psData[saturation] = device.currentValue(saturation)
psData[level] = device.currentValue(level)

then state.red = psData

To set color: setColor(state.red)

In a rule?????? I would probably try a local variable by each color.
So: localVariable colorName, string, value: "[hue: hueVal, saturation: satValue, level: levelValue]"
But no guarantee here.

Of course, in a scene (using Hubitat App), you simply set the devices to your desired colors, color temperatures, levels, and switch states. Save the scene by name. When you activate, it will go to the settings when you saved the state.

To set the bulbs to the same color prior to saving the scene, write down the Hue, saturation, and level and then command hue, saturation, and level separately for each bulb. That is really the easiest way.

The next release will have more color picking options in apps, especially in Rule 5.1.

Including using RGB values directly, although as shown above, the Pick a Color allows setting RGB explicitly also.

8 Likes

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