mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-16 08:04:22 -04:00
Fix some bugs for hoover appliances, fix #31
This commit is contained in:
parent
8c1bba2468
commit
f1e16312ff
5 changed files with 29 additions and 6 deletions
|
@ -1,6 +1,8 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from pyhon import Hon
|
||||
from pyhon.parameter.base import HonParameter
|
||||
from pyhon.parameter.fixed import HonParameterFixed
|
||||
from pyhon.parameter.range import HonParameterRange
|
||||
|
||||
from homeassistant.components.number import (
|
||||
|
@ -179,7 +181,11 @@ class HonNumberEntity(HonEntity, NumberEntity):
|
|||
return self._device.get(self.entity_description.key)
|
||||
|
||||
async def async_set_native_value(self, value: float) -> None:
|
||||
self._device.settings[self.entity_description.key].value = value
|
||||
setting = self._device.settings[self.entity_description.key]
|
||||
if not (
|
||||
isinstance(setting, HonParameter) or isinstance(setting, HonParameterFixed)
|
||||
):
|
||||
setting.value = value
|
||||
await self.coordinator.async_refresh()
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue