Skip to content

Commit

Permalink
Explicit conversion to double value added (openhab#11887)
Browse files Browse the repository at this point in the history
Fixes openhab#11886


Signed-off-by: Martin Herbst <[email protected]>
  • Loading branch information
MHerbst authored and Nemer_Daud committed Jan 28, 2022
1 parent 8a17520 commit 0698000
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public ShellyStatusSensor getSensorStatus() throws ShellyApiException {
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)) {
Expand Down

0 comments on commit 0698000

Please sign in to comment.