Skip to content

Commit 785007d

Browse files
committed
limit rel hum
1 parent 4f08b39 commit 785007d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_si7021.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def relative_humidity(self):
129129
self.start_measurement(HUMIDITY)
130130
value = self._data()
131131
self._measurement = 0
132-
return value * 125.0 / 65536.0 - 6.0
132+
return min(100.0, value * 125.0 / 65536.0 - 6.0)
133133

134134
@property
135135
def temperature(self):

0 commit comments

Comments
 (0)