mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-14 07:04:23 -04:00
Split program and mach mode of ac #75
This commit is contained in:
parent
78727e89cd
commit
fbd1bdf5ba
23 changed files with 508 additions and 31 deletions
|
@ -201,8 +201,6 @@ 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)
|
||||
command = self.entity_description.key.split(".")[0]
|
||||
await self._device.commands[command].send()
|
||||
await self.coordinator.async_refresh()
|
||||
|
||||
@callback
|
||||
|
@ -224,6 +222,10 @@ class HonSelectEntity(HonConfigSelectEntity):
|
|||
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)
|
||||
command = self.entity_description.key.split(".")[0]
|
||||
await self._device.commands[command].send()
|
||||
if command != "settings":
|
||||
self._device.sync_command(command, "settings")
|
||||
await self.coordinator.async_refresh()
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue