@@ -2693,10 +2693,15 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj,
2693
2693
return true ;
2694
2694
}
2695
2695
2696
+ // Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and
2697
+ // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0)
2696
2698
if (colorTemperatureMinimum < tempPhysicalMin)
2697
2699
{
2698
2700
colorTemperatureMinimum = tempPhysicalMin;
2699
2701
}
2702
+
2703
+ // Per spec, colorTemperatureMaximumMireds field is limited to ColorTempPhysicalMaxMireds and
2704
+ // when colorTemperatureMaximumMireds field is 0, ColorTempPhysicalMaxMireds shall be used
2700
2705
if ((colorTemperatureMaximum == 0 ) || (colorTemperatureMaximum > tempPhysicalMax))
2701
2706
{
2702
2707
colorTemperatureMaximum = tempPhysicalMax;
@@ -2804,10 +2809,15 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj,
2804
2809
Attributes::ColorTempPhysicalMinMireds::Get (endpoint, &tempPhysicalMin);
2805
2810
Attributes::ColorTempPhysicalMaxMireds::Get (endpoint, &tempPhysicalMax);
2806
2811
2812
+ // Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and
2813
+ // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0)
2807
2814
if (colorTemperatureMinimum < tempPhysicalMin)
2808
2815
{
2809
2816
colorTemperatureMinimum = tempPhysicalMin;
2810
2817
}
2818
+
2819
+ // Per spec, colorTemperatureMaximumMireds field is limited to ColorTempPhysicalMaxMireds and
2820
+ // when colorTemperatureMaximumMireds field is 0, ColorTempPhysicalMaxMireds shall be used
2811
2821
if ((colorTemperatureMaximum == 0 ) || (colorTemperatureMaximum > tempPhysicalMax))
2812
2822
{
2813
2823
colorTemperatureMaximum = tempPhysicalMax;
0 commit comments