frobar: Fix temperature for sensor without high values

This commit is contained in:
Geoffrey Frogeye 2024-06-18 04:25:18 +02:00
parent 795ed034f8
commit 5462fa43fa
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8

View file

@ -188,7 +188,7 @@ class TemperatureProvider(AlertingSection, PeriodicUpdater):
self.dangerThresold = temp.critical or 100.0
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:
return "{:.0f}°C".format(temp.current)
return ""