From eb4a4de80c13b72913b17fc48dd43b629a8dd5b3 Mon Sep 17 00:00:00 2001 From: Sven Killig Date: Sun, 6 Dec 2020 18:31:47 +0100 Subject: [PATCH] [amazonechocontrol] HandlerTemperatureSensor: increase resolution (#9246) Signed-off-by: Sven Killig Signed-off-by: Christian Grasser --- .../internal/smarthome/HandlerTemperatureSensor.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java index 500b3247290c4..eb863d655bebd 100644 --- a/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java +++ b/bundles/org.openhab.binding.amazonechocontrol/src/main/java/org/openhab/binding/amazonechocontrol/internal/smarthome/HandlerTemperatureSensor.java @@ -12,8 +12,7 @@ */ package org.openhab.binding.amazonechocontrol.internal.smarthome; -import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.CHANNEL_TYPE_TEMPERATURE; -import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.ITEM_TYPE_NUMBER_TEMPERATURE; +import static org.openhab.binding.amazonechocontrol.internal.smarthome.Constants.*; import java.io.IOException; import java.util.List; @@ -71,7 +70,7 @@ public void updateChannels(String interfaceName, List stateList, Upd JsonObject value = state.get("value").getAsJsonObject(); // For groups take the first if (temperatureValue == null) { - int temperature = value.get("value").getAsInt(); + float temperature = value.get("value").getAsFloat(); String scale = value.get("scale").getAsString(); if ("CELSIUS".equals(scale)) { temperatureValue = new QuantityType(temperature, SIUnits.CELSIUS);