]> git.basschouten.com Git - openhab-addons.git/commitdiff
Explicit conversion to double value added (#11887)
authorMartin Herbst <develop@mherbst.de>
Wed, 29 Dec 2021 17:47:07 +0000 (18:47 +0100)
committerGitHub <noreply@github.com>
Wed, 29 Dec 2021 17:47:07 +0000 (18:47 +0100)
Fixes #11886

Signed-off-by: Martin Herbst <develop@mherbst.de>
bundles/org.openhab.binding.shelly/src/main/java/org/openhab/binding/shelly/internal/api/ShellyHttpApi.java

index 13c5b8ede95ec2d2de05772c03f47c48349cf8d4..ea64fda12c71eeaada06e6105dd5dc3bde380bc0 100644 (file)
@@ -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)) {