Open
Description
Board
ESP32-C6
Device Description
Development Board
Hardware Configuration
GPIO15 connected to LED
Version
latest master (checkout manually)
IDE Name
Arduino IDE
Operating System
Windows 11
Flash frequency
80 MHz
PSRAM enabled
no
Upload speed
921600
Description
Tried the Zigbee Color Dimmable Light Example.
When setting colors with Zigbee2Mqtt (Home Assistant) the RGB values set in the example don't match the values sent:
Setting red to 255 sets red only to 69.
Setting green to 255 sets green only to 34.
Setting blue to 255 sets blue only to 128.
Sketch
ZigbeeColorDimmableLight zbColorLight = ZigbeeColorDimmableLight(ZIGBEE_RGB_LIGHT_ENDPOINT);
/********************* RGB LED functions **************************/
void setRGBLight(bool state, uint8_t red, uint8_t green, uint8_t blue, uint8_t level) {
if (!state) {
rgbLedWrite(led, 0, 0, 0);
return;
}
float brightness = (float)level / 255;
rgbLedWrite(led, red * brightness, green * brightness, blue * brightness);
/*** Output RGB values ***/
Serial.print("R: ");
Serial.print(red,DEC);
Serial.print(" G: ");
Serial.print(green,DEC);
Serial.print(" B: ");
Serial.println(blue,DEC);
}
Debug Message
R: 69 G: 0 B: 0
R: 0 G: 34 B: 0
R: 0 G: 0 B: 128
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.