Brand new and requesting help with an idea for Philips Hue lighting "scenes"

API is easier, because you get a list of the 3 variables for each bulb at once. But I am looking for a better alternative, because both of them are pretty painful.

I added “Custom color” to the color selections. Then you input the hex for the color and a saturation value; level is already there also. Please check this out and let me know if it works right. It appears to work. @Sticks18?

Github for Rule:


I’m at work so can’t test, but I think the color value should just be 0-100 like saturation since you pass it into the hue field of the color map.

The hex color value that you get from the color wheel combines hue and saturation into one by using 6 digits like #RRGGBB where RR is a two digit hex representation of the red concentration (0-255), same with GG for green and BB for blue. That could give you hexToInt conversions well over 100.

For individual hue and sat values, the wheel passes a value from 0-100 that gets converted by the individual deviceTypes based on what range the device accepts. For instance, the Hue bulbs do a 0-100 to 0-255 conversion for hue and saturation, then passes those values through the Hue API.

1 Like

OK, I didn’t understand how this works. I will blow off the hex input, and just make the color a number.


1 Like

I don’t know if this is useful information or not, but from the SmartThings Activity Feed, it looks like it can poll for 5 different types of value, but it doesn’t often poll for all 5.

They are:

Yup, Bruce’s SmartApp Family can do the first 4 with the latest enhancement, which is all you need to set a scene. Switch and Level are basic on/off and dim functions that non-color dimmers have and are handled in a different option of his app, but are available for color bulbs. Hue and saturation determine the bulb color, which is what he added for custom user input.

Color field is unnecessary for every color device I’ve seen so far. The main thing Color is used for is setting the position of the dot in the color wheel selection tile in the ST app. You can change the color of a bulb without this field and most SmartApps do. The only thing is you’ll notice the next time you go into the color picker that the dot is in the center and not at the position of the current color of the bulb. Not a big deal.


Hey Bruce, thanks for adding the “custom” color to the Rule. It works perfectly for what I wanted. You rock my friend! If you keep adding functions, my SmartApps tab will soon look like the “old” new dashboard, one entry with a whole lot of white space around it…

1 Like

@bravenel Another useful feature would be to have the app remember the last color and state the light was set to prior to the change. I have a few other lighting apps I use to do this currently. After an action set it back to the original color and state. I have a family member who is hard of hearing and I use light color as indicators throughout the house.

I just wanted to share the link here for a solution that has worked perfectly for me, since others may stumble upon my post here if they are facing a similar circumstance.