From 061691508b88bc7e0cf49523a6c24ff5e785a333 Mon Sep 17 00:00:00 2001 From: PlusPlus-ua Date: Fri, 26 Nov 2021 10:35:19 +0200 Subject: [PATCH] Fixed handling of zero values in TuyaNumberEntity (#60393) --- homeassistant/components/tuya/number.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/tuya/number.py b/homeassistant/components/tuya/number.py index 634f4858186..c4063d22e22 100644 --- a/homeassistant/components/tuya/number.py +++ b/homeassistant/components/tuya/number.py @@ -286,7 +286,7 @@ class TuyaNumberEntity(TuyaEntity, NumberEntity): value = self.device.status.get(self.entity_description.key) # Scale integer/float value - if value and isinstance(self._type_data, IntegerTypeData): + if value is not None and isinstance(self._type_data, IntegerTypeData): return self._type_data.scale_value(value) return None