mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Fix brightness in generic ColorChannelHandler (#4242)
Signed-off-by: Timotheos Constambeys <timo0190@gmail.com>
This commit is contained in:
parent
873bb53cbc
commit
83bd5fff2e
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user