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:
Holger Friedrich
2023-04-08 11:42:18 +02:00
committed by GitHub
parent 64723db7aa
commit 3cd9c6c86c
10 changed files with 21 additions and 22 deletions

View File

@@ -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,

View File

@@ -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);