[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:
darthbevis 2023-03-02 14:58:34 -05:00 committed by GitHub
parent 44634a6e89
commit 660ec10d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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");