Skip to content

Commit 9166ad6

Browse files
committed
fix for offsets
handle tuple input to match the docs, minimal change.
1 parent cde55fa commit 9166ad6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

adafruit_hdc302x.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,11 @@ def offsets(self) -> Tuple[float, float]:
191191
)
192192

193193
@offsets.setter
194-
def offsets(self, temp: float, humid: float) -> None:
194+
def offsets(self, values: Tuple[float, float]) -> None:
195195
"""
196196
:param values: A tuple containing the temperature and humidity offsets.
197197
"""
198+
temp, humid = values # Unpack tuple
198199
rh_offset = self._calculate_offset(humid, False)
199200
temp_offset = self._calculate_offset(temp, True)
200201
combined_offsets = (rh_offset << 8) | temp_offset

0 commit comments

Comments
 (0)