Skip to content

Commit

Permalink
Fixes Last Refresh time incorrect #160
Browse files Browse the repository at this point in the history
  • Loading branch information
ronytomen committed Jan 21, 2023
1 parent 9cfcc60 commit 1ed8eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/fordpass/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def get_value(self, ftype):
elif self.sensor == "lastRefresh":
return dt.as_local(
datetime.strptime(
self.coordinator.data[self.sensor], "%m-%d-%Y %H:%M:%S"
self.coordinator.data[self.sensor] + "+0000", "%m-%d-%Y %H:%M:%S%z"
)
)
elif self.sensor == "elVeh":
Expand Down Expand Up @@ -435,4 +435,4 @@ def device_class(self):
if SENSORS[self.sensor]["device_class"] is "distance":
return SensorDeviceClass.DISTANCE
else:
return None
return None

0 comments on commit 1ed8eb8

Please sign in to comment.