The same way you'd set any color-capable device to the color you want. You can do so manually from the device detail page (e.g. the "Set Color" or "Set Color Temperature" commands), create an instance of an app (automation) that sets the color or color temperature in response to some event, use a dashboard or voice control (after configuring such an option), some combination of these, or whatever other options you may want.
If you are new to Hubitat, I suggest looking at examples or the docs. For example, here is where you can find information all built-in apps, where "apps" are (mostly) the ways you'd create an automation on the hub: Apps Documentation | Hubitat Documentation
Hi @bertabcd1234, not sure if this has been reported before, but I don't believe the "flash once" command is honouring preset color. Could this be added? Basically what I am wanting to do is press a Samsung button in a room to toggle motion lighting and have two colored bulbs flash either green or red depending if the motion lighting is being turned on (green) or off (red). The on and off commands seem to take into account the preset color settings.
Unfortunately, no, the staged color is faked in the driver, as the API does not provide a way to set it (unless you want to turn on the device first, which I suppose is a workaround....).
I installed via Package Manager and the one app and ten drivers show there and under Developer tools. I'm able to activate the sunset simulator lab (my primary goal). What I can't figure out is how to add the various devices connected to the Hue hub to Hubitat.
Devices are added via the CoCoHue app on your hub (under Apps at this point, not Apps Code). But I'm not sure what that sunset thing is since it's nothing I recognize...
Likely not, as if CoCoHue isn't parsing the data into some event, it's likely that there is nothing there for it to do so with (button event parsing was tested with a few different devices I have but written generally enough that it should work with most; not sure what device you mean, but I did test the v1 and v2 Hue Dimmers, among others). But to be certain, you'd need to enable debug logging on the device and see if any distinct data comes through on that real-world event.
Actually held works only for 2 and 3 buttons.
1 and 4 doesn't understand it.
Debug log just shows button hold for 1 and 2 as button press.
I held button 2 and it's recognized right.
That is standard info logging, not debug logging (which must be enabled on the device and which I would need to actually see the underlying data -- though my suspicion is that there won't be any way to distinguish the event there either, and the events generated that you see as "info" logs are just a reflection of that).
Oh my god. That explains. None of these devices aren't paired to Hue. They are paired with hubitat and the reason why I did it long time ago was to get 2 and 3 buttons to be used in webcore. It wasn't possible earlier for some reason (can't remember) if using Hubitat hue integration.
If I now pair them back to hue it actually might be possible that all buttons work by pushing and holding. I'm really sorry for spending your time with my stupid things..
I doubt it. From what I’ve seen and read, button 1 and 4 only send push events and the “held” button feature available for Hue labs is done somehow in software. I’ll double check since I have several paired to Hue bridges.
Edit: I stand corrected. Button 1 and 4 both send held/released events apparently. This is using CoCoHue to import the Hue 4-button dimmer from the Hue bridge.
I've released a minor update, CoCoHue v4.1.6, with fixes for the setEffect() command (only affects group and RGBW drivers). It would fail when called with a numeric parameter in some cases, which should not happen, as this is the standard format for this command (although it's pretty boring for Hue; there is only one effect, only for RGB/RGBW devices, and only one valid effect number you can pass in: 1 to start "color loop" -- or 0 to go back to "none" -- and this is the recommended way to start or stop the effect, though setting color/CT or turning off also works for the latter and, non standard, any string value -- i.e., the name of the effect -- in the lightEffects attribute map).
As always, installation instructions are in the first post. HPM or bundle ZIP recommended; if updating manually, only the group and RGBW drivers have changed.