Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
correcting return types
Browse files Browse the repository at this point in the history
  • Loading branch information
jposada202020 committed Aug 7, 2023
1 parent f533e8a commit b1c69a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions micropython_adt7410/adt7410.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def comparator_mode(self, value: int) -> None:
self._comparator_mode = value

@property
def high_temperature(self) -> float:
def high_temperature(self) -> int:
"""
High temperature limit value in Celsius
When the temperature goes above the :attr:`high_temperature`,
Expand All @@ -329,7 +329,7 @@ def high_temperature(self, value: int) -> None:
self._temperature_high = value * 128

@property
def low_temperature(self) -> float:
def low_temperature(self) -> int:
"""
Low temperature limit value in Celsius.
When the temperature goes below the :attr:`low_temperature`,
Expand All @@ -341,7 +341,7 @@ def low_temperature(self) -> float:
The INT pin is activated if an under temperature event occur
The default setting is 10°C
"""
return self._temperature_low / 128
return self._temperature_low // 128

@low_temperature.setter
def low_temperature(self, value: int) -> None:
Expand All @@ -350,7 +350,7 @@ def low_temperature(self, value: int) -> None:
self._temperature_low = value * 128

@property
def critical_temperature(self) -> float:
def critical_temperature(self) -> int:
"""
Critical temperature limit value in Celsius
When the temperature goes above the :attr:`critical_temperature`,
Expand All @@ -362,7 +362,7 @@ def critical_temperature(self) -> float:
The INT pin is activated if a critical over temperature event occur
The default setting is 147°C
"""
return self._temperature_critical / 128
return self._temperature_critical // 128

@critical_temperature.setter
def critical_temperature(self, value: int) -> None:
Expand Down

0 comments on commit b1c69a0

Please sign in to comment.