mirror of
https://github.com/danieldemus/openhab-addons
synced 2026-07-29 12:34:21 +02:00
[tradfri] Fix deprecations in color conversion code (#20868)
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault;
|
||||
import org.eclipse.jdt.annotation.Nullable;
|
||||
import org.openhab.core.library.types.HSBType;
|
||||
import org.openhab.core.library.types.PercentType;
|
||||
import org.openhab.core.util.ColorUtil;
|
||||
|
||||
/**
|
||||
* The {@link TradfriColor} is used for conversion between color formats.
|
||||
@@ -87,7 +88,7 @@ public class TradfriColor {
|
||||
float x = unnormalize(xyX);
|
||||
float y = unnormalize(xyY);
|
||||
|
||||
HSBType converted = HSBType.fromXY(x, y);
|
||||
HSBType converted = ColorUtil.xyToHsb(new double[] { x, y });
|
||||
|
||||
final Integer brightness = this.brightness;
|
||||
if (brightness == null) {
|
||||
|
||||
Reference in New Issue
Block a user