mirror of
https://opendev.org/x/pyghmi
synced 2026-01-09 09:42:31 +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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user