Room Lighting Using IF THEN ELSE

If the bulbs are setup correctly in HE you should be able to directly set the color/temp/brightness. I only have two dimmer only Hue bulbs but I am certain there would be a lot of people taking about it if they could not control the colors correctly.

Also, instead of using toggle, you should use an off command followed by an on command. Toggle just takes whatever state it is in and flips it, so if its on it goes off, it does not flip it twice bringing it back to the prior state.

The best use case for toggle is if you have a button where when you push it you want to reverse the state of the light each push, otherwise toggle is not very useful.


Are these bulbs connected to the Hue Bridge? If so, you should just use scenes and activate the scene. Have a holiday scene and a white scene. When you activate a Hue Scene, the bulbs go directly to that color without showing the previous color.

1 Like

I'd also be wary of cutting power to smart lights like this, it may have unintended consequences to the comm's on your mesh. Best to use scenes like @JB10 suggested.

@JB10 So this is part of the problem for me, I am unsure how to start a scene from HE.. I use CoCoHue and I have some HUE labs scenes. I had a holloween scene from CocoHue and not really sure how I event got it working….

@sburke781 I took the advice and removed the toggle commend and and just turned on the hue lights themselves.

1 Like

In CocoHue you can "Select Scenes", which should allow you to select scenes defined on your bridge, which will create a device on HE that can be included in automations where you want to activate the scene. I am not 100% sure about the HueLabs scenes. There is an option under "Advanced Options" in Coco-Hue to include scenes not associated with a Room/Zone, you may need to turn this on to see the HueLabs scenes, if you can't see them already.

1 Like

Hue Labs scenes can be brought into Hubitat if they can be activated via a virtual button in the Hue app. Importing them is the same as regular scenes except you do it via the “Select Hue Lab Activators” option in CoCoHue.

Once everything is in Hubitat, CoCoHue scenes are just switches or buttons to use in your rules. From there it becomes fairly straightforward for your rule:

Action: If mode equals Halloween, turn on Halloween scene, else, turn on White scene

By going this way, your lights go directly to the colors defined in the scene and you do not have to worry about last state from removing power.

1 Like