Explicit conversion to double value added (#11887)

Fixes #11886


Signed-off-by: Martin Herbst <develop@mherbst.de>
This commit is contained in:
Martin Herbst 2021-12-29 18:47:07 +01:00 committed by GitHub
parent 352c171f9a
commit a407555362
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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)) {