I am trying to modify a driver for a wifi LED strip but running into issues with the setColor COLOR_MAP because it seems to force that the third value is pulled from "level". This LED strip uses a RBG value to set the color, and 'brightness' for the brightness. I have tested it and the color can definitely be independent of the brightness. The issue comes in especially if you change things using the app, you can end up with a RGB value that translates to a 50 V in the HSV conversion, but the strip could be at any brightness level 1-100. Or alternately you can have a color with 100V (pure red) but set it to 50% brightness. So when I refresh the device from Hubitat the color picker and dashboard then do not show the color correctly.
Why is the COLOR_MAP tied to level? Shouldn't it be something like luminance or lightness? Is there any way I can re-write the setColor command in my code and force it to use another attribute besides 'level' for the third value? I think that would 100% solve the problem.
Another observation, if I share this device to Hubitat via its own skill then I get a "Brightness" slider along with a color picker. If I share it via Hubitat I get a "Power Level" slider and a color picker.