light: fix rgb hex parser swapped blue and green values (#2474)

This was causing WebUI colorpicker to jump between positions in rgb mode, after the websocket immediately reported back rgb tuple containing different values
This commit is contained in:
hamed
2021-09-26 02:08:54 +03:30
committed by GitHub
parent 9087fcf618
commit 62d83c6194

View File

@@ -988,8 +988,8 @@ void _lightFromHexPayload(const char* payload, size_t len) {
uint8_t values[4] {0, 0, 0, 0};
if (hexDecode(payload, len, values, sizeof(values))) {
_light_mapping.red(values[0]);
_light_mapping.blue(values[1]);
_light_mapping.green(values[2]);
_light_mapping.green(values[1]);
_light_mapping.blue(values[2]);
if (WithBrightness) {
lightBrightness(values[3]);
}