Fix update entity when changing config

This commit is contained in:
Andre Basche 2024-03-30 19:47:46 +01:00
parent 510c10bd9f
commit 36aed2e6ea
5 changed files with 14 additions and 14 deletions

View file

@ -58,7 +58,7 @@ class HonLockEntity(HonEntity, LockEntity):
setting.value = setting.max if isinstance(setting, HonParameterRange) else 1
self.async_write_ha_state()
await self._device.commands["settings"].send()
self.async_write_ha_state()
self.coordinator.async_set_updated_data(None)
async def async_unlock(self, **kwargs: Any) -> None:
"""Unlock method."""
@ -68,7 +68,7 @@ class HonLockEntity(HonEntity, LockEntity):
setting.value = setting.min if isinstance(setting, HonParameterRange) else 0
self.async_write_ha_state()
await self._device.commands["settings"].send()
self.async_write_ha_state()
self.coordinator.async_set_updated_data(None)
@property
def available(self) -> bool: