Skip to content

Commit

Permalink
Fixing fan mode parameters for some model
Browse files Browse the repository at this point in the history
  • Loading branch information
svmironov committed Jul 21, 2024
1 parent 3d5d88b commit 7df44bc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions custom_components/air_cloud/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class AirCloudClimateEntity(ClimateEntity):
_attr_has_entity_name = True

def __init__(self, api, device, temp_adjust):
self._target_temp = 0
self._api = api
self._temp_adjust = temp_adjust
self._id = device["id"]
Expand Down Expand Up @@ -287,8 +288,13 @@ async def async_update(self):
pass

async def __execute_command(self):
await self._api.execute_command(self._id, self._power, self._target_temp, self._mode, self._fan_speed,
self._fan_swing, self._humidity)
target_temp = self._target_temp

if self._mode == "FAN":
target_temp = 0

await self._api.execute_command(self._id, self._power, target_temp, self._mode,
self._fan_speed, self._fan_swing, self._humidity)
await asyncio.sleep(10)
self._update_lock = False
await self.async_update()
Expand Down

0 comments on commit 7df44bc

Please sign in to comment.