[Release] Color Temperature in Dashboard + Percent to Color Temperature App

Control a color temperature directly from a dashboard tile!

This super-simple app lets you control a Color Temperature device from your dashboards via a Dimmable Device tile.


Setting it all up:

  1. Install the Percent to Color Temperature apps from here: (start with the parent app)
  1. Create a Virtual Dimmer device—this will be used to control a real color temperature device.
  2. Create a new Percent to Color Temperature Child App with your virtual dimmer as the source, and your color temperature device as your destination
  3. Add your Virtual Dimmer to your dashboard
  4. Control your CT directly from a dimmer tile!
  5. (Optional) Add the following CSS to each slider tile you want to control CT from:

#tile-1{
background: rgb(181,0,0);
background: linear-gradient(90deg, rgba(181,0,0,1) 0%, rgba(255,184,0,1) 23%, rgba(255,255,255,1) 56%, rgba(0,212,255,1) 100%);
}
#tile-1 .tile-title, #tile-1 .tile-contents .tile-secondary, #tile-1 .tile-contents div .material-icons, #tile-1 .tile-contents .tile-primary div:nth-child(3) {display:none!important;}
#tile-1 .tile-contents .tile-primary .vue-slider .vue-slider-rail{ height: 50px; background-color:rgba(255,255,255,0.2)!important; border-radius:5px!important}
#tile-1 .tile-contents .tile-primary .vue-slider .vue-slider-rail .vue-slider-process{border-radius: 5px!important; top-right-border-radius: 0px!important; bottom-right-border-radius:0px!important; background-color:rgba(0,0,0,0.3)!important;}
#tile-1 .tile-contents .tile-primary .vue-slider .vue-slider-dot{height:50px!important;}
#tile-1 .tile-contents .tile-primary .vue-slider .vue-slider-dot .vue-slider-dot-handle{ border-radius: 5px!important;}

Change "tile-1" to your tile number!


17 Likes

Very nice! I have a 2 button dimmer set to adjust dimmer level 10% with each button press. It changes the CT by 400K with each press. I haven't tried out the ramp up/down yet, it sounds busy.

1 Like

Thanks for this, amazing!

1 Like

Adam, love this app, props.

Two quick questions if I might:

  1. What triggers the app -- any change to the dimmer device? In other words, am I correct to understand that any change to the dimmer device will update the bulb's CT whether the bulb is currently on or even if the bulb gets turned on after the app runs?
  2. Is there some way to name the child apps that I'm missing? Right now I have 4-5 child apps, but they all inherit the name of the parent, so it gets a bit confusing. Not a big deal, but the control freak in me is breathing heavy :crazy_face:

Correct.

I may have forgotten to add the re-naming of child apps in. I will take a look. It's an easy fix if it isn't in there.

Added :slight_smile:

1 Like

Thanks Adam. Works really well. One question you or someone might know the answer to....

Because I'm trying to avoid embedding CT management into every one of my lighting automation, my thought was to use your app to manipulate CT of key bulbs whether they are off or on. And then separately use my existing lighting automations to turn the bulbs on/off and set dimmer levels/colors, according to other events.

The problem, which I didn't appreciate in advance, is if you change the CT of a bulb, it automatically turns the bulb on as well. For this use-case, I want to be able to periodically change the CT and not turn on the bulb. Is there anyway to do this?

When I go into the device details page and change the CT manually, the switch always goes on "by itself". I can immediately turn the bulb off, and the CT setting remains, but that seems like a kludge. Any ideas?

You have to enable color prestaging in the device page. Also, you can’t use it with a group device, can only address bulbs individually.

1 Like

Frickin' brilliant. I always wondered what prestaging meant. Now I know.

Since I'm prestaging color temperature, not color or dimming level, would you expect prestaging to still work? Guess I'll try it.

yes, it works for color or color temp. I would leave off level prestaging (Sengled driver) as it seems to cause problems for me at least. That way, a level command will still turn on the light. BTW, if you do decide to use it, sending a level command that is the same as what the light is already set to will turn on the light (with level prestaging enabled), whereas a different level will not.

Thanks. I don't care about prestaging for level or color. For my use-case, I only am trying to prestage for color temperature because I am using the OP's app to manage CT of my bulbs (for circadian purposes) and a whole set of separate apps for lighting automation.

Too bad the group devices don't inherit the prestaging behavior, but that's just a little inconvenience.

Thanks again Ken!

I KNOW! It would be nice to be able to do this with zigbee group messaging, but oh well. Good luck with your setup.

1 Like

Adam, one other idea re: this app for you....

If it were easy to specify multiple bulbs for a single virtual dimmer, it would cut down on the number of child apps quite a bit. Because of the prestaging lesson that @adamkempenich just schooled me on, I learned you can't preset color temp on a group device--you have to do it on each physical bulb separately. Which means one has to have a separate child '% to CT' app for every individual bulb. Not hard, but it gets a little repetitious.

Also not a big deal for me cuz I already have them all set up--just thinking about those that follow. Your app--your call!

1 Like

Yeah. I'll implement it :slight_smile:

3 Likes

Support for multiple CT devices has been added :slight_smile: Let me know if issues are encountered.

1 Like

Yes, some new people are finding this handy trick! Unfortunately it doesn't seem to be working, at lest on my new Juno Connect bulb. I can change the color temperature manually, directly from the device control. The dashboard tile (I used 'zero' and edited all the values in the css to match) shows in color, with a question mark in it. But the virtual connection isn't altering the color temperature. Not sure what to do next, or even if this will work at all.

There’s an issue with data validation from when Hubitat added an extra parameter to setColorTemperature, I imagine. Let me update the code…

Edit: what do your logs say when you try and change it?

Nothing gets logged. It's as if I didn't configure something properly, which is entirely possible. I have two tiles in a dashboard named 'kitchen' where this test lamp is. One of the tiles (tile #1) works 'directly' on the lamp and lets me dim it. That works fine, as does the direct-to-device control options. The other tile (tile #0) represents the virtual device that points at the child process app and in turn is set to talk to the device driver. The idea is for the dimmer bar in the tile #0 to re-map to color temperature. For this Juno Connect Zigbee lamp, the device driver that works is named "generic zigbee CT lamp " ... any of this make sense?

I got it working. Very nice. You have to use a 'connector dimmer' object. Thanks for the help and sorry for the fire drill.

@adamkempenich, all my bulbs have relied on your % to CT App for a year now without any problems.

However, I just noticed that this option no longer exists, at least not with Hue bulbs (I'm using CoCoHue by @bertabcd1234). The prestaging option that used to exist is now replaced by a command in the bulb device to preset CT. While that change, in and of itself, gives us more flexibility I would think, it does mean I can no longer use this app to prestage CT through the day, because now my bulbs turn on every time CT is adjusted.

Am I thinking about this wrong? Is there an easy way to alter the app to accommodate this change? If not, I'm going to use RM5 to emulate your app -- just seems like a shame.