I have a “dumb” RGB strip and am running into a brick wall. Clearly, the RGB light component is the right one to use. The problem is that every single writeup I have seen says to use esp8266_pwm as the platform for each color channel. It sure seems like no one writing the pages for ESP Home even considered that someone would want to use an ESP32 for this…
I am using an ESP32, not an ESP8266, so following the writeups, I receive the error:
Component output.esp8266_pwm requires component esp8266
I have successfully used ledc as the platform for dimmable white LEDs, so thought I’d give that a try for the color channels - since no other tutorial offers anything other than esp8266_pwm
. As many may guess, that fails. But in a weird way. When I connect to the ESP-hosted web page, the RGB light component displays as a light with on/off and a single 0-255 “intensity” slider. No color picker Turning it on and changing the slider results in red at about 85%, but yellow at 100%.
So, how does one create an RGB light interface on an ESP32?
light:
- platform: rgb
name: "LED Strip"
red: out_red
green: out_grn
blue: out_blu
output:
- platform: esp8266_pwm <<-- THIS PART
id: out_red
pin: GPIO16
- platform: esp8266_pwm <<-- THIS PART
id: out_grn
pin: GPIO17
- platform: esp8266_pwm <<-- THIS PART
id: out_blu
pin: GPIO21