diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 8f2bc4c93..51a02848e 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -2,6 +2,7 @@ * Refactored TLS based on BearSSL, warning breaking change for fingerprints validation (see doc) * Add checkbox to GUI password field enabling visibility during password entry only (#5934) * Add using heap when more than 199 IRSend values need to be send. May need increase of define MQTT_MAX_PACKET_SIZE too (#5950) + * Fix channel command for dual dimmers (#5940) * * 6.5.0.15 20190606 * Change pubsubclient MQTT_KEEPALIVE from 10 to 30 seconds in preparation of AWS IoT support diff --git a/sonoff/xdrv_04_light.ino b/sonoff/xdrv_04_light.ino index b737fcc1d..82da14baa 100644 --- a/sonoff/xdrv_04_light.ino +++ b/sonoff/xdrv_04_light.ino @@ -942,7 +942,13 @@ public: // Channels are: R G B CW WW // Brightness is automatically recalculated to adjust channels to the desired values void changeChannels(uint8_t *channels) { - _state->setChannels(channels); + if (LST_COLDWARM == light_subtype) { + // remap channels 0-1 to 3-4 if cold/warm + uint8_t remapped_channels[5] = {0,0,0,channels[0],channels[1]}; + _state->setChannels(remapped_channels); + } else { + _state->setChannels(channels); + } saveSettings(); calcLevels(); }