Skip to content

Commit

Permalink
Fix for #18
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouni committed Apr 7, 2021
1 parent 075c32b commit 5b6fb66
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion luxtronik/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ class Timestamp(Base):
measurement_type = "timestamp"

def from_heatpump(self, value):
return datetime.datetime.fromtimestamp(value)
if value > 0:
return datetime.datetime.fromtimestamp(value)
return datetime.datetime.fromtimestamp(0)


def to_heatpump(self, value):
return datetime.datetime.timestamp(value)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="luxtronik",
version="0.3.7",
version="0.3.8",
author="Bouni",
author_email="[email protected]",
description="A luxtronik heatpump controller interface",
Expand Down

0 comments on commit 5b6fb66

Please sign in to comment.