From: Martin Herbst Date: Wed, 29 Dec 2021 17:47:07 +0000 (+0100) Subject: Explicit conversion to double value added (#11887) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=a4075553629e5584b53c41349fd1fe3b600d70e7;p=openhab-addons.git Explicit conversion to double value added (#11887) Fixes #11886 Signed-off-by: Martin Herbst --- diff --git a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyHttpApi.java b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyHttpApi.java index 13c5b8ede9..ea64fda12c 100644 --- a/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyHttpApi.java +++ b/bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyHttpApi.java @@ -199,8 +199,8 @@ public class ShellyHttpApi { status.tmp.tC = status.tmp.units.equals(SHELLY_TEMP_CELSIUS) ? status.tmp.value : ImperialUnits.FAHRENHEIT.getConverterTo(SIUnits.CELSIUS).convert(getDouble(status.tmp.value)) .doubleValue(); - double f = (double) SIUnits.CELSIUS.getConverterTo(ImperialUnits.FAHRENHEIT) - .convert(getDouble(status.tmp.value)); + double f = SIUnits.CELSIUS.getConverterTo(ImperialUnits.FAHRENHEIT).convert(getDouble(status.tmp.value)) + .doubleValue(); status.tmp.tF = status.tmp.units.equals(SHELLY_TEMP_FAHRENHEIT) ? status.tmp.value : f; } if ((status.charger == null) && (profile.settings.externalPower != null)) {