mirror of
https://github.com/Andre0512/hon.git
synced 2024-01-19 02:50:19 +00:00
Fix issues when changing climate mode #52
This commit is contained in:
parent
80b3741f2f
commit
0f9f0dee4c
|
@ -150,11 +150,13 @@ class HonACClimateEntity(HonEntity, ClimateEntity):
|
||||||
async def async_set_hvac_mode(self, hvac_mode):
|
async def async_set_hvac_mode(self, hvac_mode):
|
||||||
self._attr_hvac_mode = hvac_mode
|
self._attr_hvac_mode = hvac_mode
|
||||||
if hvac_mode == HVACMode.OFF:
|
if hvac_mode == HVACMode.OFF:
|
||||||
await self._device.commands["stopProgram"].send()
|
command = "stopProgram"
|
||||||
else:
|
else:
|
||||||
mode = HON_HVAC_PROGRAM[hvac_mode]
|
mode = HON_HVAC_PROGRAM[hvac_mode]
|
||||||
self._device.settings["startProgram.program"].value = mode
|
self._device.settings["startProgram.program"].value = mode
|
||||||
await self._device.commands["startProgram"].send()
|
command = "startProgram"
|
||||||
|
await self._device.commands[command].send()
|
||||||
|
self._device.sync_command(command, "settings")
|
||||||
self.async_write_ha_state()
|
self.async_write_ha_state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue