Fix unkown for 0 in number entity

This commit is contained in:
Andre Basche 2024-03-30 20:23:39 +01:00
parent 36aed2e6ea
commit a746584833

View File

@ -300,7 +300,7 @@ class HonConfigNumberEntity(HonEntity, NumberEntity):
@property
def native_value(self) -> float | None:
if value := self._device.settings[self.entity_description.key].value:
if (value := self._device.settings[self.entity_description.key].value) != "":
return float(value)
return None