Skip to content

Commit

Permalink
Use round instead of int
Browse files Browse the repository at this point in the history
  • Loading branch information
gerw committed Oct 9, 2023
1 parent 653f8a5 commit 1d62b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions luxtronik/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def from_heatpump(cls, value):

@classmethod
def to_heatpump(cls, value):
raw = int(float(value) / cls.scaling_factor)
raw = round(float(value) / cls.scaling_factor)
return raw


Expand Down Expand Up @@ -299,7 +299,7 @@ def from_heatpump(cls, value):

@classmethod
def to_heatpump(cls, value):
return int((value - 1) * 2)
return round((value - 1) * 2)


class Minutes(Base):
Expand Down

0 comments on commit 1d62b16

Please sign in to comment.