Explicit conversion to double value added (#11887)
Fixes #11886 Signed-off-by: Martin Herbst <develop@mherbst.de>
This commit is contained in:
@@ -199,8 +199,8 @@ public class ShellyHttpApi {
|
|||||||
status.tmp.tC = status.tmp.units.equals(SHELLY_TEMP_CELSIUS) ? status.tmp.value
|
status.tmp.tC = status.tmp.units.equals(SHELLY_TEMP_CELSIUS) ? status.tmp.value
|
||||||
: ImperialUnits.FAHRENHEIT.getConverterTo(SIUnits.CELSIUS).convert(getDouble(status.tmp.value))
|
: ImperialUnits.FAHRENHEIT.getConverterTo(SIUnits.CELSIUS).convert(getDouble(status.tmp.value))
|
||||||
.doubleValue();
|
.doubleValue();
|
||||||
double f = (double) SIUnits.CELSIUS.getConverterTo(ImperialUnits.FAHRENHEIT)
|
double f = SIUnits.CELSIUS.getConverterTo(ImperialUnits.FAHRENHEIT).convert(getDouble(status.tmp.value))
|
||||||
.convert(getDouble(status.tmp.value));
|
.doubleValue();
|
||||||
status.tmp.tF = status.tmp.units.equals(SHELLY_TEMP_FAHRENHEIT) ? status.tmp.value : f;
|
status.tmp.tF = status.tmp.units.equals(SHELLY_TEMP_FAHRENHEIT) ? status.tmp.value : f;
|
||||||
}
|
}
|
||||||
if ((status.charger == null) && (profile.settings.externalPower != null)) {
|
if ((status.charger == null) && (profile.settings.externalPower != null)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user