From 760fb46fdc9e67d43534037a6541d0d09fea3dfa Mon Sep 17 00:00:00 2001 From: Daniel Cherubini Date: Fri, 21 Jun 2024 11:45:39 +0200 Subject: [PATCH] fixes missing await --- custom_components/panasonic_cc/pcomfortcloud/apiclient.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/panasonic_cc/pcomfortcloud/apiclient.py b/custom_components/panasonic_cc/pcomfortcloud/apiclient.py index 3c2ff7a..64334d8 100644 --- a/custom_components/panasonic_cc/pcomfortcloud/apiclient.py +++ b/custom_components/panasonic_cc/pcomfortcloud/apiclient.py @@ -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({ @@ -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