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

@ -263,7 +263,7 @@ class HonConfigSelectEntity(HonEntity, SelectEntity):
async def async_select_option(self, option: str) -> None:
setting = self._device.settings[self.entity_description.key]
setting.value = self._option_to_number(option, setting.values)
self.async_write_ha_state()
self.coordinator.async_set_updated_data(None)
@callback
def _handle_coordinator_update(self, update: bool = True) -> None:
@ -317,7 +317,7 @@ class HonSelectEntity(HonEntity, SelectEntity):
await self._device.commands[command].send()
if command != "settings":
self._device.sync_command(command, "settings")
self.async_write_ha_state()
self.coordinator.async_set_updated_data(None)
@property
def available(self) -> bool: