Skip to content

Commit

Permalink
Don't update CT if device is off
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Jackson <[email protected]>
  • Loading branch information
cdjackson committed Jan 14, 2025
1 parent f28ad8d commit beeae2d
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,7 @@ public void attributeUpdated(ZclAttribute attribute, Object val) {
case ZclColorControlCluster.ATTR_COLORTEMPERATURE:
if (val instanceof Integer mired && mired != lastMired) {
HSBType ctHSB = ColorUtil.xyToHsb(ColorUtil.kelvinToXY(1e6 / mired));
lastHSB = new HSBType(ctHSB.getHue(), ctHSB.getSaturation(),
lastHSB.getBrightness());
updateChannelState(lastHSB);
updateColorHSB(ctHSB.getHue(), ctHSB.getSaturation());
lastMired = mired;
}
break;
Expand Down

0 comments on commit beeae2d

Please sign in to comment.