How do I control a Hue scene from Hubitat?

I have several scenes already on Hue that I want to trigger with buttons in Hubitat. When I searched here it didn't seem like Hubitat supports this which is disappointing. I saw suggestions to use the Groups and Scenes and capture the light but that doesn't work. I pick coloured dimmer for the light type, but when you capture the scene all it captures is the brightness and a few other settings but not colour. So if I turn on any of the various scenes I've captured all they do is go white and change the brightness. I've tried to manually recreate the scenes in Hubitat but I'm not able to. The Hue scenes are ones like dark blue etc but with Hubitat all I get are light washed out colors which is too complicated. Is there any other way? IFTTT is also out of the question. Thanks.

If you're OK with third-party code, the community Hue B Smart integration is the only thing I'm aware of at the moment that allows easy access to Hue scenes. [EDIT: Since this time, I've actually written my own: CoCoHue.] That being said, I'm pretty sure a Hubitat scene should capture color/CT settings from Hue Bridge bulbs, too, but I've only used it with directly-paired lights, so I can't say for sure. (Do you observe that it actually fails to capture these values? Sometimes I've needed to activate the scene twice for captured states to actually apply correctly, but that's another issue.)

I'm working on something to supplement the native Hue Bridge integration that will allow scene activation from Hubitat. I was only planning on making this available for use within a button controller-type app I'm working on, but I could expand the scope to create full "Hue scene activator" buttons Hubitat if there was interest. (And I was only planning on doing scenes since I prefer built-in apps whenever possible, and the Hue Bridge one is otherwise great.) In the meantime, if you're familiar with the Hue API, you could use ogiewon's HTTP Momentary Switch driver driver to send the scene activation command to the Hue Bridge over its API (not for the faint of heart).

Thanks I'll give that a try. It seems like it captures the colours, like shows all the values but when you run any of the scenes nothing happens. The first time I did it I captured 5 scenes only to realize it shows 100% identical settings on all 5 of them. Rebooted Hubitat twice and then it would change the values when capturing, but just not the colours.

Oh, so there could be something else going on there. The Hue Bridge integration doesn't immediately update Hue bulb states if changed outside Hubitat; you'll have to wait for the next scheduled refresh/poll (I think the default is 30 seconds but it can be configured for as low as 5 seconds, which I wouldn't recommend unless you otherwise need that). Instead of waiting for that, you could also do a manual refresh on the Hue Bridge device before capturing the scene (again, on the Bridge device, not on an individual bulb, which has no effect).

So if you aren't doing this already, my recommended workflow would be: activate Hue scene, wait for poll or manually refresh Hue Bridge device, then capture Hubitat scene.

Thanks I'll give that a try! What I was doing in between capturing scenes was rebooting Hubitat as I figured that would really force it to refresh the status. That's good to know though as I was under the bulb itself and kept hitting refresh also which did nothing so was getting frustrated with that. I'll mess around with it again later and see as it would definitely be nice if I'm able to get it to work. Thanks!

Why not create a Hubitat scene instead?

That's what I'm saying doesn't work, it doesn't capture colors. Tried so many times all it does it capture the brightness even though I have colored dimmer selected and all my Hue bulbs.

Yes it does. It captures the color perfectly. However, you have to make sure that any changes you've made from outside of Hubitat have had time to sync with the hub. What is likely happening is that you are capturing the scene too quickly. It can take a minute (by the default settings) for changes made outside of the HE environment to sync with the hub. This is due to the fact that changes made within the Hue network are not reported to Hubitat. HE has to poll the hue bridge to be notified of those changes. So, make sure that the settings for your hue lights that you want to have in the HE scene are the ones that are displayed on the edit device page BEFORE capturing the HE scene.

It doesn't work for me as well. It captures the color (the level, the hue, and the saturation are recorded correctly), but when it runs the scene it just sets the brightness, not the color.

Are these directly paired (Zigbee) bulbs, or Hue Bridge integration devices (so effectively LAN as far as Hubitat is concerned)? The possible causes and fixes could be different for either.

Thanks for the help and sorry for reviving a year-old thread. They are connected via Hue Bridge.

It sounds like you've checked this, but just to be sure: did you wait for the Hue bulb states to update in Hubitat after changing them (or change them from Hubitat in the first place to avoid this) before capturing the scene? Can you post the "Current States" section of one of the bulbs in question and/or the scene's states when it captured that bulb, plus a description of what you want the settings to actually be, just so someone can make sure they match? (You don't have to if you know Hubitat's color model or how CT works and can interpret this information yourself, but I know lots of people have questions about how it works.)

Other than that, the only thing I can think is that maybe the scene involves too many bulbs. Hue recommends rate limiting commands to bulbs to 10 per second and commands to Hue groups at 1 per second. A scene may send multiple commands (e.g., a "Set Color Temperature" and also a "Set Level" for a CT-based scene). Unless you have a veritable ton of bulbs, this seems unlikely to be (reality is usually better than Hue's estimates, and you should get something regardless), but I'm not sure what else to guess at this point.

thanks again for your help! I was redoing everything to get the screenshots and now it just works. Go figure :man_shrugging: