From 9166ad6ff67048accf78cd95d813e97385ceaa66 Mon Sep 17 00:00:00 2001 From: Mikey Sklar Date: Wed, 12 Mar 2025 09:28:13 -0700 Subject: [PATCH] fix for offsets handle tuple input to match the docs, minimal change. --- adafruit_hdc302x.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_hdc302x.py b/adafruit_hdc302x.py index ad6696e..1e076ae 100644 --- a/adafruit_hdc302x.py +++ b/adafruit_hdc302x.py @@ -191,10 +191,11 @@ def offsets(self) -> Tuple[float, float]: ) @offsets.setter - def offsets(self, temp: float, humid: float) -> None: + def offsets(self, values: Tuple[float, float]) -> None: """ :param values: A tuple containing the temperature and humidity offsets. """ + temp, humid = values # Unpack tuple rh_offset = self._calculate_offset(humid, False) temp_offset = self._calculate_offset(temp, True) combined_offsets = (rh_offset << 8) | temp_offset