From: darthbevis <34101857+darthbevis@users.noreply.github.com> Date: Thu, 2 Mar 2023 19:58:34 +0000 (-0500) Subject: [ecobee] Increase temperature precision to decimal (#14517) X-Git-Url: https://git.basschouten.com/?a=commitdiff_plain;h=660ec10d4bf6aa2c9d77df92192a36827672db6c;p=openhab-addons.git [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 --- diff --git a/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java b/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java index fec258982c..54603c7c05 100644 --- a/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java +++ b/bundles/org.openhab.binding.ecobee/src/main/java/org/openhab/binding/ecobee/internal/handler/EcobeeUtils.java @@ -110,7 +110,7 @@ public final class EcobeeUtils { QuantityType convertedTemp = ((QuantityType) 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");