mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-25 14:55:55 +01:00
[ecobee] Increase temperature precision to decimal (#14517)
* Update EcobeeUtils.java Correcting rounding of setHold values so we have 0.1°F tolerance instead of 1°F. Makes it easier to use in °C Signed-off-by: darthbevis <darthbevis@gmail.com>
This commit is contained in:
parent
44634a6e89
commit
660ec10d4b
@ -110,7 +110,7 @@ public final class EcobeeUtils {
|
||||
QuantityType<Temperature> convertedTemp = ((QuantityType<Temperature>) value)
|
||||
.toUnit(ImperialUnits.FAHRENHEIT);
|
||||
if (convertedTemp != null) {
|
||||
return Integer.valueOf(convertedTemp.intValue() * 10);
|
||||
return Integer.valueOf((int) (convertedTemp.doubleValue() * 10));
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("temperature is not a QuantityType");
|
||||
|
Loading…
Reference in New Issue
Block a user