Color temperature control for custom device

Hello,

I’m trying to set up a light that uses MQTT to control the brightness and color temperature, and I’m almost got everything working. All the messages/topics are going through, but I can’t seem to get the UI to give me a slider or any other control for the color temperature. Here’s my configuration:

light:
  - platform: mqtt
    name: "dummy light 1"
    state_topic: "dummy1/state"
    command_topic: "dummy1/set"
    brightness_state_topic: "dummy1/brightness/state"
    brightness_command_topic: "dummy1/brightness/set"
    brightness_scale: 100
    color_temp_state_topic: "dummy1/color_temp/state"
    color_temp_command_topic: "dummy1/color_temp/set"

And here’s what the dashboard gives me for control:
Annotation 2020-07-24 101407

You can see that the brightness slider is there and the on/off switch, but that’s it. I’ve seen pictures of color temperature sliders that other people have managed, and I’m not sure how to make it appear for me. I would have thought that if the brightness topics being defined resulted in the brightness slider, color temp would be the same.

The device is a custom thing I’m building using an ESP32, so there won’t be any pre-made anything for it, and I’ll need to figure out how to configure it manually (eventually through an autodiscovery message, but I think that’s equivalent to this dummy entry in configuration.yaml… right?).

What happens to the pop-up card if you turn the light on?

My light pop-up cards don’t show the colour picker or colour temp slider unless the light is on. They’re not mqtt lights though.

Bingo, thanks, that was the trick. Turns out I was premature, something’s goofy with the state message, I had to manually send out the request from the mqtt debug screen to get the UI’s power switch to ‘stick’. Not sure why, still figuring out all this mqtt stuff.

I’m still a little surprised that brightness and color temp values and controls are treated differently.

Ah, I should have said: I switched back to real hardware, then manually sent out the state message to get a state from the ESP32, then it stuck and the slider appeared. The dummy entity above still doesn’t do anything, but that’s ok.

Edit: Oh, duh. You just send the state after you get the set command. Problem solved!

You can turn the light on with the brightness control, so I guess that’s why it’s always up front.