[wifiled] Deprecations (#20843)

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
Holger Friedrich
2026-06-01 23:17:38 +02:00
committed by GitHub
parent 04545e7e5c
commit 2a147edce9
2 changed files with 7 additions and 4 deletions
@@ -16,6 +16,7 @@ import static java.lang.Math.max;
import org.openhab.core.library.types.HSBType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.util.ColorUtil;
/**
* Internal LED state.
@@ -46,11 +47,12 @@ public class InternalLedState {
}
public InternalLedState withColor(HSBType color) {
PercentType[] rgb = ColorUtil.hsbToRgbPercent(color);
//@formatter:off
return new InternalLedState(
color.getRed().doubleValue() / 100,
color.getGreen().doubleValue() / 100,
color.getBlue().doubleValue() / 100,
rgb[0].doubleValue() / 100,
rgb[1].doubleValue() / 100,
rgb[2].doubleValue() / 100,
w,
w2
);
@@ -23,6 +23,7 @@ import org.openhab.core.library.types.HSBType;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.util.ColorUtil;
/**
* The {@link LEDStateDTO} class holds the data and the settings for a LED device (i.e. the selected colors, the running
@@ -171,7 +172,7 @@ public class LEDStateDTO {
}
public int getRGB() {
return hsbType.getRGB();
return ColorUtil.hsbTosRgb(hsbType);
}
public HSBType getHSB() {