From bc23ea47f406664ba57d49e868c2fdc387377019 Mon Sep 17 00:00:00 2001 From: Carl Quirion Date: Mon, 18 Dec 2023 14:58:56 -0500 Subject: [PATCH] Linting fix --- pyhilo/device/__init__.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/pyhilo/device/__init__.py b/pyhilo/device/__init__.py index 1342ab9..07c21bf 100644 --- a/pyhilo/device/__init__.py +++ b/pyhilo/device/__init__.py @@ -118,13 +118,17 @@ async def _set_attribute( await self._api._set_device_attribute(self, attribute, value) # Update internal state after sending request to API, assuming it will # succeed and we will get a reading back form signalR. This avoids ui flickering. - self.update_readings(DeviceReading(**{ - "deviceId": self.id, - "locationId": self.location_id, - "timeStampUTC": datetime.utcnow().isoformat(), - "value": value, - "device_attribute": attribute, - })) + self.update_readings( + DeviceReading( + **{ + "deviceId": self.id, + "locationId": self.location_id, + "timeStampUTC": datetime.utcnow().isoformat(), + "value": value, + "device_attribute": attribute, + } + ) + ) else: LOG.warning(f"{self._tag} Invalid attribute {attribute} for device")