mirror of
https://github.com/Andre0512/hon.git
synced 2025-05-13 22:54:23 -04:00
Control air conditioners
This commit is contained in:
parent
8e4e491c33
commit
8aa8563b9b
26 changed files with 1641 additions and 1 deletions
|
@ -97,6 +97,20 @@ SELECTS = {
|
|||
translation_key="programs_dw",
|
||||
),
|
||||
),
|
||||
"AC": (
|
||||
SelectEntityDescription(
|
||||
key="startProgram.program",
|
||||
name="Program",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="programs_ac",
|
||||
),
|
||||
SelectEntityDescription(
|
||||
key="startProgram.humanSensingStatus",
|
||||
name="Eco Pilot",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
translation_key="eco_pilot",
|
||||
),
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
@ -147,6 +161,8 @@ 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"]:
|
||||
self._device.commands["startProgram"].send()
|
||||
await self.coordinator.async_refresh()
|
||||
|
||||
@callback
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue