Skip to content

Commit

Permalink
Merge pull request #245 from ronytomen/ronytomen-fix-refresh
Browse files Browse the repository at this point in the history
Fixes Last Refresh time incorrect #160
  • Loading branch information
itchannel committed Jan 26, 2023
2 parents 9cfcc60 + 1ed8eb8 commit d041e98
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 d041e98

Please sign in to comment.