From 6f058bf392e1797f1bd514d1c52361735073aa2b Mon Sep 17 00:00:00 2001 From: Necroneco Date: Fri, 28 Feb 2025 16:43:41 +0800 Subject: [PATCH] fix: fix sensor display precision (#708) --- custom_components/xiaomi_home/miot/miot_spec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/xiaomi_home/miot/miot_spec.py b/custom_components/xiaomi_home/miot/miot_spec.py index d4ec8f5..859453b 100644 --- a/custom_components/xiaomi_home/miot/miot_spec.py +++ b/custom_components/xiaomi_home/miot/miot_spec.py @@ -540,7 +540,7 @@ class MIoTSpecProperty(_MIoTSpecBase): self.unit = unit self.value_range = value_range self.value_list = value_list - self.precision = precision or 1 + self.precision = precision if precision is not None else 1 self.expr = expr self.spec_id = hash(