Adapt to ColorUtil changes in core (#14724)
* [deconz][dmx][mqtt.generic][mqtt.homeassistant][tado][tradfri][webthing] Adapt to core change (ColorUtil) openhab/openhab-core#3479 Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -446,7 +446,7 @@ public class LightThingHandler extends DeconzBaseThingHandler {
|
||||
xyY[0] = xy[0];
|
||||
xyY[1] = xy[1];
|
||||
xyY[2] = ((double) bri) / BRIGHTNESS_MAX;
|
||||
updateState(channelUID, ColorUtil.xyToHsv(xyY));
|
||||
updateState(channelUID, ColorUtil.xyToHsb(xyY));
|
||||
}
|
||||
} else if (bri != null && hue != null && sat != null) {
|
||||
updateState(channelUID,
|
||||
|
||||
@@ -117,7 +117,7 @@ public class SensorThingHandler extends SensorBaseThingHandler {
|
||||
case CHANNEL_COLOR -> {
|
||||
final double @Nullable [] xy = newState.xy;
|
||||
if (xy != null && xy.length == 2) {
|
||||
updateState(channelUID, ColorUtil.xyToHsv(xy));
|
||||
updateState(channelUID, ColorUtil.xyToHsb(xy));
|
||||
}
|
||||
}
|
||||
case CHANNEL_CONSUMPTION -> updateQuantityTypeChannel(channelUID, newState.consumption, WATT_HOUR);
|
||||
|
||||
Reference in New Issue
Block a user