From 83bd5fff2e1f7287051c1d0a010476422de60b81 Mon Sep 17 00:00:00 2001 From: Timotheos Constambeys Date: Wed, 22 May 2024 19:08:34 +0300 Subject: [PATCH] Fix brightness in generic ColorChannelHandler (#4242) Signed-off-by: Timotheos Constambeys --- .../thing/binding/generic/converter/ColorChannelHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/generic/converter/ColorChannelHandler.java b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/generic/converter/ColorChannelHandler.java index 5514c31d7..527a818dd 100644 --- a/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/generic/converter/ColorChannelHandler.java +++ b/bundles/org.openhab.core.thing/src/main/java/org/openhab/core/thing/binding/generic/converter/ColorChannelHandler.java @@ -65,7 +65,7 @@ public class ColorChannelHandler extends AbstractTransformingChannelHandler { state = newState; return hsbToString(newState); } else if (command instanceof PercentType percentCommand && state instanceof HSBType colorState) { - HSBType newState = new HSBType(colorState.getBrightness(), colorState.getSaturation(), percentCommand); + HSBType newState = new HSBType(colorState.getHue(), colorState.getSaturation(), percentCommand); state = newState; return hsbToString(newState); }