File tree 1 file changed +18
-0
lines changed
src/app/clusters/color-control-server
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -2602,6 +2602,24 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint)
2602
2602
2603
2603
isColorTempTransitionDone = computeNewColor16uValue (colorTempTransitionState);
2604
2604
2605
+ if (!isColorTempTransitionDone)
2606
+ {
2607
+ // Check whether our color temperature has actually changed. If not, do
2608
+ // nothing, and wait for it to change.
2609
+ uint16_t currentColorTemp;
2610
+ if (Attributes::ColorTemperatureMireds::Get (endpoint, ¤tColorTemp) != EMBER_ZCL_STATUS_SUCCESS)
2611
+ {
2612
+ // Why can't we read our attribute?
2613
+ return ;
2614
+ }
2615
+
2616
+ if (currentColorTemp == colorTempTransitionState->currentValue )
2617
+ {
2618
+ scheduleTimerCallbackMs (configureTempEventControl (endpoint), TRANSITION_UPDATE_TIME_MS.count ());
2619
+ return ;
2620
+ }
2621
+ }
2622
+
2605
2623
Attributes::RemainingTime::Set (endpoint, colorTempTransitionState->timeRemaining );
2606
2624
2607
2625
if (isColorTempTransitionDone)
You can’t perform that action at this time.
0 commit comments