Skip to content

Commit b5e8d72

Browse files
authored
Merge pull request #12 from caternuson/iss11
Limit relative humidity
2 parents 4f08b39 + 785007d commit b5e8d72

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)