Modified Hue drivers

I touched upon this in another topic but I hate how the default behavior for the Hue bulbs is to power on when either color (or temperature) or brightness is changed. This stems from the Hue API, but since Hubitat has objects that represent the bulbs or groups it is easy to change. My suggestions a few years ago (possibly my code posted in the ST forum) were incorporated into the Hue code for bulbs--allowing changing color temperature without powering on the bulb, but still changing the level (brightness) powered on the bulb. I tweaked the Hue B Smart code to allow both color temperature and brightness changes without powering on the bulb or group. For some reason the code for the groups was mangled somewhat so I simply used the bulb code with the necessary syntax changes (light to groups, state to action) and things work great. Now, with Button Controller I can very easily set up some actions that would otherwise require a lot of rules or a complicated piston. For example I have different color temperatures and brightness levels per mode for my hue groups, and with one button I can toggle the lights on or off at the required brightness, or a hold for full brightness 4000k with the following actions:

press:
toggle switch -- not toggle dimmer because that sets it to only one specified level
set brightness per mode
set color temperature per mode

hold:
on at 100 percent
4000K

Without the changes if the toggle caused it to turn off, the level or color temperature changes would turn it back on. If this sounds useful to anyone other than myself I'll set myself a GIT account and fork the original project.

1 Like

Definitely interested in experimenting with this, I find the current behavior frustrating too. If the color temperature could be changed without turning the light on it would be a big plus in my setup.

The current Hue B Smart code works well for single bulbs (color temperature won't power on bulbs that were off) but the groups driver I seem to recall doesn't work as well. I haven't bothered modifying the code to remove sections not relevant to Hue White Ambiance bulbs (of which I have several). Maybe I'll just post a temporary project and submit a pull request later so you can try it out. Putting kids to sleep hopefully I'm up long enough to start...

1 Like

As an update, I no longer think it is worthwhile to use these drivers in the present form. There is considerable random lag, and I can't recall the HE drivers causing groups to power on individually (ie popcorn effect). Being able to change the color temperature is nice, but I suppose I'll just code a custom app that looks for bulbs turning on and set the temperature according to mode or time. Having brightness changes not cause the bulbs to power on is less useful than I thought because Button Controller expects that when a dim command to be sent that the bulb (or group) indeed goes on. Otherwise you still have to issue a power on command. I don't think it's available and I'll request it but a toggle dim per mode would be nice....

2 Likes