frobar: Fix temperature for sensor without high values
This commit is contained in:
parent
795ed034f8
commit
5462fa43fa
|
@ -188,7 +188,7 @@ class TemperatureProvider(AlertingSection, PeriodicUpdater):
|
||||||
self.dangerThresold = temp.critical or 100.0
|
self.dangerThresold = temp.critical or 100.0
|
||||||
self.updateLevel(temp.current)
|
self.updateLevel(temp.current)
|
||||||
|
|
||||||
self.icon = Section.ramp(temp.current / temp.high, self.RAMP)
|
self.icon = Section.ramp(temp.current / self.warningThresold, self.RAMP)
|
||||||
if self.state >= 1:
|
if self.state >= 1:
|
||||||
return "{:.0f}°C".format(temp.current)
|
return "{:.0f}°C".format(temp.current)
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Reference in a new issue