Skip to content
This repository has been archived by the owner on Jan 7, 2025. It is now read-only.

Commit

Permalink
fix: round temperature before issuing command
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Pajot authored and gpajot committed Nov 3, 2022
1 parent c55e80c commit 49fbf02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airton_ac/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def set_temperature(self, temp: float) -> Values:
"""Set temperature.
Will round and multiply by 10 so that 18.5 will be 180.
"""
set_point = max(min(int(temp), 31), 16) * 10
set_point = max(min(round(temp), 31), 16) * 10
return self._update({Command.SET_POINT.value: set_point})

def set_mode(self, mode: Mode) -> Values:
Expand Down

0 comments on commit 49fbf02

Please sign in to comment.