This commit is contained in:
0x07CB 2024-10-19 23:59:05 +02:00 committed by GitHub
commit 4db03927e8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -88,7 +88,7 @@ class DHT11(object):
total = self.humidity + self.temperature
# is checksum ok ?
if not (total & 255) == self.checksum:
raise
raise ValueError("Checksum incorrect")
elif 16 <= self.bit < 24: # in temperature byte
self.temperature = (self.temperature << 1) + val
elif 0 <= self.bit < 8: # in humidity byte