Skip to content

Commit

Permalink
Linting fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nlz242 committed Dec 18, 2023
1 parent a768094 commit bc23ea4
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions pyhilo/device/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit bc23ea4

Please sign in to comment.