From 72b092f449ec93a0a484cbe4fe5ce9e140ba9537 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 27 Mar 2020 14:49:02 -0400 Subject: [PATCH] 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 --- pyghmi/ipmi/sdr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyghmi/ipmi/sdr.py b/pyghmi/ipmi/sdr.py index c141d268..fd403e61 100644 --- a/pyghmi/ipmi/sdr.py +++ b/pyghmi/ipmi/sdr.py @@ -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: