mirror of
https://opendev.org/x/pyghmi
synced 2025-01-29 20:37:36 +00:00
Filter out disabled sensors
When get sensor reading says a sensor is disabled without also saying it is unavailable, mark it as unavailable. Change-Id: I00c61824f3539373b48223da9b37acfed97f6576
This commit is contained in:
parent
85b2b6e5ab
commit
72b092f449
@ -451,7 +451,7 @@ class SDREntry(object):
|
||||
'type': self.sensor_type,
|
||||
'id': self.sensor_number,
|
||||
}
|
||||
if reading[1] & 0b100000:
|
||||
if reading[1] & 0b100000 or not reading[1] & 0b1000000:
|
||||
output['unavailable'] = 1
|
||||
return SensorReading(output, self.unit_suffix)
|
||||
if self.numeric_format == 2:
|
||||
|
Loading…
x
Reference in New Issue
Block a user