Skip to content

Commit

Permalink
fixes missing await
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcherubini committed Jun 21, 2024
1 parent 97c3998 commit 760fb46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/panasonic_cc/pcomfortcloud/apiclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def get_devices(self):
if 'deviceHashGuid' in device:
device_id = device['deviceHashGuid']
else:
device_id = hashlib.md5(device['deviceGuid'].encode('utf-8')).hexdigest()
device_id = hashlib.md5(
device['deviceGuid'].encode('utf-8')).hexdigest()

self._device_indexer[device_id] = device['deviceGuid']
self._devices.append({
Expand Down Expand Up @@ -149,7 +150,7 @@ async def set_device(self, device_id, **kwargs):
# routine to set the auto mode of fan (either horizontal, vertical, both or disabled)
if air_x is not None or air_y is not None:
fan_auto = 0
device = self.get_device(device_id)
device = await self.get_device(device_id)

if device and device['parameters']['airSwingHorizontal'].value == -1:
fan_auto = fan_auto | 1
Expand Down

0 comments on commit 760fb46

Please sign in to comment.