Instant send settings

This commit is contained in:
Andre Basche 2023-05-14 03:16:21 +02:00
parent 17d4d14ead
commit 845adc75c9
3 changed files with 12 additions and 4 deletions

View file

@ -163,7 +163,9 @@ class HonSelectEntity(HonEntity, SelectEntity):
async def async_select_option(self, option: str) -> None:
self._device.settings[self.entity_description.key].value = option
if self._device.appliance_type in ["AC"]:
if "settings." in self.entity_description:
self._device.commands["settings"].send()
elif self._device.appliance_type in ["AC"]:
self._device.commands["startProgram"].send()
await self.coordinator.async_refresh()