]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] Fix double stratus update (#9901)
authorMarcel <marcel@verpaalen.com>
Fri, 22 Jan 2021 02:01:31 +0000 (03:01 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Jan 2021 02:01:31 +0000 (18:01 -0800)
closing: #9898

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java

index 74b5d0d28ff760821513626f0e7a3305d3b38559..d5badf5fd06ef7ac3195ba760a9e64e979e3a74c 100644 (file)
@@ -595,6 +595,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler {
                 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());