Update to new RGBCT component
mew1033 opened this issue · comments
The newest version of esphome supports a new RGBCT component that removes the need for a custom library. This is the relevant part of my config:
output:
- platform: esp8266_pwm
pin: GPIO13
id: out_ct
- platform: esp8266_pwm
pin: GPIO5
id: out_ctbrightness
- platform: esp8266_pwm
pin: GPIO4
id: out_red
- platform: esp8266_pwm
pin: GPIO12
id: out_green
- platform: esp8266_pwm
pin: GPIO14
id: out_blue
light:
- platform: rgbct
name: "${friendly_name}"
red: out_red
green: out_green
blue: out_blue
color_temperature: out_ct
white_brightness: out_ctbrightness
cold_white_color_temperature: 166 mireds
warm_white_color_temperature: 333 mireds
color_interlock: True
Thanks for giving us the heads up! Yay!
@mew1033 Hmm... Trouble I'm having with that is in HomeAssistant the White is actually warm, and the Warm is actually White.
And now that I'm on the newer version of ESPHome, it won't compile your custom component so I can't switch back :/
OK, got it, had to invert the out_ctbrightness pin for HomeAssistant. So for HomeAssistant users, use
output:
- platform: esp8266_pwm
pin: GPIO13
id: out_ct
inverted: true
- platform: esp8266_pwm
pin: GPIO5
id: out_ctbrightness
- platform: esp8266_pwm
pin: GPIO4
id: out_red
- platform: esp8266_pwm
pin: GPIO12
id: out_green
- platform: esp8266_pwm
pin: GPIO14
id: out_blue
light:
- platform: rgbct
name: "${upper_devicename}"
red: out_red
green: out_green
blue: out_blue
color_temperature: out_ct
white_brightness: out_ctbrightness
cold_white_color_temperature: 166 mireds
warm_white_color_temperature: 333 mireds
color_interlock: True