Setting HSL values for an RGB light

FWIW, CoCoHue will (apparently like your driver) set values below the accepted range to the minimum accepted value and values higher than the accepted range to the maximum accepted value. It looks like Hubitat's generic drivers don't do anything to prevent you from sending out-of-range values (but obviously they do correctly scale either 0-100 or 0-360 to the appropriate bulb values--there's just nothing to keep you in that range), so they'll do whatever the bulb does (likely nothing) when it gets an out-of-range value: HubitatPublic/examples/drivers/GenericZigbeeRGBWBulb.groovy at master · hubitat/HubitatPublic · GitHub. The default Hue integration also doesn't do anything in such a case (not sure if it sends something to the Bridge and the Bridge ignores it or if it knows and just doesn't try).

I wasn't sure which direction to go with my drivers but erred on the side of doing something vaguely similar to what the user probably wanted, even though this shouldn't really ever happen. I'm willing to change this (or not) if someone can make a more compelling argument for either behavior. :slight_smile:

1 Like