diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 39fc5f9cdc..ae16a0d9c8 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -2565,6 +2565,24 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) isColorTempTransitionDone = computeNewColor16uValue(colorTempTransitionState); + if (!isColorTempTransitionDone) + { + // Check whether our color temperature has actually changed. If not, do + // nothing, and wait for it to change. + uint16_t currentColorTemp; + if (Attributes::ColorTemperatureMireds::Get(endpoint, ¤tColorTemp) != EMBER_ZCL_STATUS_SUCCESS) + { + // Why can't we read our attribute? + return; + } + + if (currentColorTemp == colorTempTransitionState->currentValue) + { + scheduleTimerCallbackMs(configureTempEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); + return; + } + } + Attributes::RemainingTime::Set(endpoint, colorTempTransitionState->timeRemaining); if (isColorTempTransitionDone)