CWWW Light: How to change color temperature?

I have an ESP32-S3 with (for now) two CCT LEDs strips (3 pin: common plus, 1 CW, 1 WW GND/cathode, so a cwww light in ESPHome).

How do I change the color temperature?

Neither in the Webserver nor via OpenHAB (native Esphome API binding) I can see a Slider/Dimmer to change color temperature? Also documentation is not clear for me, which attribute I need to set?

Configuration:

[...]
web_server:
  port: 80

output:

  # LED 1: CCT
  - platform: ledc
    pin: GPIO4
    id: led1_ww

  - platform: ledc
    pin: GPIO5
    id: led1_cw

  # LED 2: CCT
  - platform: ledc
    pin: GPIO6
    id: led2_ww

  - platform: ledc
    pin: GPIO7
    id: led2_cw

light:
  - platform: cwww
    name: "CCT1"
    id: id_led_cct1
    cold_white: led1_cw
    warm_white: led1_ww
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K
    constant_brightness: true  
  
  - platform: cwww
    name: "CCT2"
    cold_white: led2_cw
    warm_white: led2_ww
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K
    constant_brightness: true

So what you see in web server?

Only Brightness:

This page does not contain the necessary information. It does not state which attribute is the color temperature.

And its for the wrong type of color-temperature LED, my type has individual channels for warm-white and cold-white, so its not a color_temperature component, but a cwww component. However, documentation for cwww is same as for color_temperature except the output channels.

Sorry for that, I was browsing quickly light components…
And I agree, cwww should give temp control here. What esphome version are you on?

Release ist 2025.12.4.

I’m out of ideas here…

Ok, as a workaround I did this:

  - platform: homeassistant
    name: "Remote ColorTemp"
    entity_id: ItemStateUpdatedEvent.IA216oT_ColorTemp
    on_value: 
      then:
        - light.control: 
            id: id_led_cct1
            color_temperature:  !lambda "return (x*(500-153)/100.0) +153;"

Which works fine - I can change the ColorTemp remotely (openhab in my case, thus the special entity ID). Is there a simple way to have a component that shows up in the webserver?

I need the device urgently at a location where there is no Wifi yet, so it will be in AP mode and I can only access the integrated webserver. (Changing Colortemp is not urgent, but nice to have).

You can use template number for that.
I’m not sure what unit color_temperature uses here, mired or K? Documentation gives “in mireds or Kelvin”… :wink:
Anyway lets stick in mireds:

number:
  - platform: template
    name: "CCT1 Color Temp"
    min_value: 0
    max_value: 100
    step: 1
    set_action:
      - light.control:
          id: id_led_cct1
          color_temperature: !lambda "return (x*(500-153)/100.0) + 153;"
1 Like