Fix bug where sensors reports no maximum.
This commit is contained in:
parent
82555cb6a7
commit
12612c1e5a
@ -11,7 +11,7 @@ class Sensor:
|
|||||||
def __init__(self, name, current, maximum, critical):
|
def __init__(self, name, current, maximum, critical):
|
||||||
self.name = name.replace(' ', '_')
|
self.name = name.replace(' ', '_')
|
||||||
self.current = int(current)
|
self.current = int(current)
|
||||||
self.maximum = int(maximum)
|
self.maximum = int(maximum) if maximum else int(critical)
|
||||||
self.critical = int(critical)
|
self.critical = int(critical)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user