Use pydeconz interface controls for number platform (#74666)

This commit is contained in:
Robert Svensson 2022-07-09 23:46:24 +02:00 committed by GitHub
parent 157d6dc83f
commit d80d16aaa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,8 +113,10 @@ class DeconzNumber(DeconzDevice, NumberEntity):
async def async_set_native_value(self, value: float) -> None:
"""Set sensor config."""
data = {self.entity_description.key: int(value)}
await self._device.set_config(**data)
await self.gateway.api.sensors.presence.set_config(
id=self._device.resource_id,
delay=int(value),
)
@property
def unique_id(self) -> str: