From d5daa92183f1db1d3356258c25f4237bd7b27a7e Mon Sep 17 00:00:00 2001 From: AndrewFG Date: Wed, 27 Nov 2024 14:08:26 +0000 Subject: [PATCH] rectacoring Signed-off-by: AndrewFG --- .../org/openhab/binding/govee/internal/GoveeHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/GoveeHandler.java b/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/GoveeHandler.java index 543854c4713a2..4af4f0ec1e8dc 100644 --- a/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/GoveeHandler.java +++ b/bundles/org.openhab.binding.govee/src/main/java/org/openhab/binding/govee/internal/GoveeHandler.java @@ -263,10 +263,10 @@ private void sendKelvin(int kelvin) throws IOException { * @return the HSB presentation state */ private static HSBType buildHSB(Color normalColor, int brightness, boolean on) { - int[] normalizedRGB = { normalColor.r(), normalColor.g(), normalColor.b() }; - HSBType normalizedHSB = ColorUtil.rgbToHsb(normalizedRGB); - PercentType brightnessParam = on ? new PercentType(brightness) : PercentType.ZERO; - return new HSBType(normalizedHSB.getHue(), normalizedHSB.getSaturation(), brightnessParam); + int[] normalRGB = { normalColor.r(), normalColor.g(), normalColor.b() }; + HSBType normalHSB = ColorUtil.rgbToHsb(normalRGB); + PercentType brightnessPercent = on ? new PercentType(brightness) : PercentType.ZERO; + return new HSBType(normalHSB.getHue(), normalHSB.getSaturation(), brightnessPercent); } void handleIncomingStatus(String response) {