Skip to content

Commit

Permalink
Merge pull request #10 from kelu16/master
Browse files Browse the repository at this point in the history
Fix unpacking negative temperature
  • Loading branch information
araines authored Feb 10, 2021
2 parents d871ad4 + fc842c0 commit ea47fca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/thermoplus_ble/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def parse_sensor(self, data):
if len(value) != 19:
continue
Payload = namedtuple('Payload', 'battery temperature humidity')
payload = Payload._make(struct.unpack('<HHH', value[10:16]))
payload = Payload._make(struct.unpack('<HhH', value[10:16]))
return {
"mac": data.get('mac'),
"rssi": data.get('rssi'),
Expand Down

0 comments on commit ea47fca

Please sign in to comment.