From 29f222249b7f9bb59c9fb11cd9e329d75b85652b Mon Sep 17 00:00:00 2001 From: Marcel Date: Fri, 22 Jan 2021 03:01:31 +0100 Subject: [PATCH] [miio] Fix double stratus update (#9901) closing: #9898 Signed-off-by: Marcel Verpaalen --- .../openhab/binding/miio/internal/handler/MiIoBasicHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java index 74b5d0d28ff76..d5badf5fd06ef 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java @@ -595,6 +595,7 @@ private void quantityTypeUpdate(MiIoBasicChannel basicChannel, JsonElement val, logger.debug("'{}' channel '{}' has unit '{}' with symbol '{}'.", getThing().getUID(), basicChannel.getChannel(), basicChannel.getUnit(), unit); updateState(basicChannel.getChannel(), new QuantityType<>(val.getAsBigDecimal(), unit)); + return; } else { logger.debug("Unit '{}' used by '{}' channel '{}' is not found.. using default unit.", getThing().getUID(), basicChannel.getUnit(), basicChannel.getChannel());