Fix missing value for number entities

This commit is contained in:
Andre Basche 2023-06-30 20:09:55 +02:00
parent e33a609d40
commit 0cd4db0839

View File

@ -252,6 +252,10 @@ class HonNumberEntity(HonEntity, NumberEntity):
class HonConfigNumberEntity(HonNumberEntity):
entity_description: HonConfigNumberEntityDescription
@property
def native_value(self) -> float | None:
return self._device.settings[self.entity_description.key].value
async def async_set_native_value(self, value: str) -> None:
setting = self._device.settings[self.entity_description.key]
if isinstance(setting, HonParameterRange):