1 parent 3294c3d commit 3bf0483Copy full SHA for 3bf0483
1 file changed
python.d/sensors.chart.py
@@ -49,6 +49,13 @@
49
]}
50
}
51
52
+LIMITS = {
53
+ 'temperature': [-127, 1000],
54
+ 'voltage': [-127, 127],
55
+ 'current': [-127, 127],
56
+ 'fan': [0, 65535]
57
+}
58
+
59
TYPE_MAP = {
60
0: 'voltage',
61
1: 'fan',
@@ -82,6 +89,11 @@ def _get_data(self):
82
89
for sf in sfi:
83
90
val = sensors.get_value(chip, sf.number)
84
91
break
92
+ typeName = TYPE_MAP[feature.type]
93
+ if typeName in LIMITS:
94
+ limit = LIMITS[typeName];
95
+ if val < limit[0] or val > limit[1]:
96
+ continue
85
97
data[prefix + "_" + str(feature.name.decode())] = int(val * 1000)
86
98
except Exception as e:
87
99
self.error(e)
0 commit comments