Set minimum color temp to prevent CWW Led Switching Off

Hi All - Hopefully an easy one.

I have a Brilliant CCT Oyster Light that I have flashed to ESPHOME. Problem is that when i set the Color Temperature too low the light fully turn off. Is their a way to set the minimum Color Temp?
Logs indiate the 485.0 mireds is the highest i can go before the light switched off. How can i set this as the maximum? or set the Color temp as the minimum?

Logs:

[17:30:39][D][light:265]: 'Office Oyster Ccw' Setting:
[17:30:39][D][light:282]:   Color Temperature: 473.0 mireds
[17:30:39][D][light:287]:   Red=100%, Green=100%, Blue=100%
[17:30:39][D][light:304]:   Transition Length: 1.0s
[17:30:57][D][light:265]: 'Office Oyster Ccw' Setting:
[17:30:57][D][light:282]:   Color Temperature: 479.0 mireds
[17:30:57][D][light:287]:   Red=100%, Green=100%, Blue=100%
[17:30:57][D][light:304]:   Transition Length: 1.0s
[17:31:07][D][light:265]: 'Office Oyster Ccw' Setting:
[17:31:07][D][light:282]:   Color Temperature: 485.0 mireds
[17:31:07][D][light:287]:   Red=100%, Green=100%, Blue=100%
[17:31:07][D][light:304]:   Transition Length: 1.0s
[17:35:10][I][ota:046]: Boot seems successful, resetting boot loop counter.

image

esphome:
  name: office_oyster_ccw
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_passphrase

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Office Oyster Ccw"
    password: "************"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  safe_mode: True

light:
  - platform: cwww
    name: "Office Oyster Ccw"
    cold_white: output_component1
    warm_white: output_component2
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 2000 K

    
output:
  - platform: esp8266_pwm
    id: output_component1 #CW
    pin: GPIO14
  - platform: esp8266_pwm
    id: output_component2 #WW
#    id: green
    pin: GPIO12
    inverted: true

Any thoughts?

Using those colorvtemperature settings ought to work. From the code:

    traits.set_min_mireds(this->cold_white_temperature_);
    traits.set_max_mireds(this->warm_white_temperature_);

Did you try this?

warm_white_color_temperature: 485 mireds

I just tried putting this in, and whenever the slider goes to maximum Warm White the light goes out. Doesn’t seem to matter what the mireds are set to.

 - platform: cwww
    name: "Office Oyster Ccw"
    cold_white: output_component1
    warm_white: output_component2
    cold_white_color_temperature: 6536 K
    warm_white_color_temperature: 470 mireds  #2000 K

While you move the slider, does it actually show 470 as the max value now?

And from where are you trying this? From a service call, from the standard settings popup for Channing the light settings or from somewhere else (a card or so)?
One thing I noticed with the service calls, is that the slider in that gui didn’t appear to adhere to the max value for colour temperature (it always goes to 500 there).

Hmm, looking at the code, 500 mireds should not be an issue, because the input value is clamped between min and max mireds.
Do you see the correct settings in the config dump that you get when starting the log viewer?

If this all doesn’t work, maybe you could try and tweak the min output level for the related output components?

The Slider in the UI shows the max as set in the Code. So setting to Max it shows 470 and this is replicated in the Log output. But yet the light still turns off.

[18:47:53][I][app:105]: ESPHome version 1.16.2 compiled on May  1 2021, 18:04:51
[18:47:53][C][wifi:443]: WiFi:
[18:47:53][C][wifi:303]:   SSID: [redacted]
[18:47:53][C][wifi:304]:   IP Address: 192.168.0.110
[18:47:53][C][wifi:306]:   BSSID: [redacted]
[18:47:53][C][wifi:307]:   Hostname: 'office_oyster_ccw'
[18:47:53][C][wifi:311]:   Signal strength: -53 dB ▂▄▆█
[18:47:53][C][wifi:315]:   Channel: 1
[18:47:53][C][wifi:316]:   Subnet: 255.255.255.0
[18:47:53][C][wifi:317]:   Gateway: 192.168.0.1
[18:47:53][C][wifi:318]:   DNS1: 192.168.0.1
[18:47:53][C][wifi:319]:   DNS2: (IP unset)
[18:47:53][C][esp8266_pwm:022]: ESP8266 PWM:
[18:47:53][C][esp8266_pwm:023]:   Pin: GPIO14 (Mode: OUTPUT)
[18:47:53][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[18:47:53][C][esp8266_pwm:022]: ESP8266 PWM:
[18:47:53][C][esp8266_pwm:023]:   Pin: GPIO12 (Mode: OUTPUT)
[18:47:53][C][esp8266_pwm:024]:   Frequency: 1000.0 Hz
[18:47:53][C][esp8266_pwm:025]:   Inverted: YES
[18:47:53][C][logger:185]: Logger:
[18:47:53][C][logger:186]:   Level: DEBUG
[18:47:53][C][logger:187]:   Log Baud Rate: 115200
[18:47:53][C][logger:188]:   Hardware UART: UART0
[18:47:53][C][light:178]: Light 'Office Oyster Ccw'
[18:47:53][C][light:180]:   Default Transition Length: 1.0s
[18:47:53][C][light:181]:   Gamma Correct: 2.80
[18:47:53][C][light:184]:   Min Mireds: 153.0
[18:47:53][C][light:185]:   Max Mireds: 470.0
[18:47:53][C][captive_portal:169]: Captive Portal:
[18:47:53][C][ota:029]: Over-The-Air Updates:
[18:47:53][C][ota:030]:   Address: office_oyster_ccw.local:8266
[18:47:53][C][api:095]: API Server:
[18:47:53][C][api:096]:   Address: office_oyster_ccw.local:6053

The log does show 470 as the colour temperature that is used, so the max mireds setting does appear to do its job.

If you use a ridiculously low max value, e.g. 200, does the light switch off when set to the max mireds value of 200 then?

If yes, could it be that the output pin definition is wrong? Is the inverted value needed or is that one actually turning the we LEDs off while they should be at their max value?

@scoobee81 I encountered the same issue. My configuration appeared to be identical to yours, albeit with different brands. However, I suspect both are manufactured by Tuya for those respective brands. Nonetheless, the pins don’t necessarily correspond to Cold White (CW) and Warm White (WW); they’re likely meant for Brightness and Temperature control.

The platform designation I had to utilize wasn’t cwww, but rather color_temperature.

I understand this thread may be old, but if you haven’t already resolved the issue, give this config a shot.

 output:
  - platform: esp8266_pwm
    id: output_temp
    pin: GPIO12
    inverted: true      
  - platform: esp8266_pwm
    id: output_bright
    pin: GPIO14

light:
  - platform: color_temperature
    name: Light Name
    brightness: output_bright
    color_temperature: output_temp
    cold_white_color_temperature: 6500 K
    warm_white_color_temperature: 2700 K 
    restore_mode: RESTORE_DEFAULT_ON
1 Like