[miio] Fix double stratus update (#9901)

closing: #9898

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2021-01-22 03:01:31 +01:00
committed by GitHub
parent 23fd13c9da
commit ca6d62ddeb

View 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());