Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
vmanuel committed Jan 5, 2020
1 parent 110b01f commit 5b8dbd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_components/google-fit/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,9 @@ def state(self):
@property
def last_updated(self):
"""Returns date when it was last updated."""
if isinstance(self._last_updated, int):
return utc_from_timestamp(self._last_updated)
if self._last_updated != 'unknown':
stamp = float(self._last_updated)
return utc_from_timestamp(int(stamp))

@property
def name(self):
Expand Down

0 comments on commit 5b8dbd4

Please sign in to comment.