diff --git a/src/widgets/temp_darwin.go b/src/widgets/temp_darwin.go index d635dd7..c5f246c 100644 --- a/src/widgets/temp_darwin.go +++ b/src/widgets/temp_darwin.go @@ -52,6 +52,8 @@ func SensorsTemperatures() ([]TemperatureStat, error) { func (self *Temp) update() { sensors, _ := SensorsTemperatures() for _, sensor := range sensors { - self.Data[sensor.SensorKey] = int(sensor.Temperature) + if sensor.Temperature != 0 { + self.Data[sensor.SensorKey] = int(sensor.Temperature) + } } } diff --git a/src/widgets/temp_linux.go b/src/widgets/temp_linux.go index e818863..781288e 100644 --- a/src/widgets/temp_linux.go +++ b/src/widgets/temp_linux.go @@ -10,7 +10,7 @@ func (self *Temp) update() { sensors, _ := psHost.SensorsTemperatures() for _, sensor := range sensors { // only sensors with input in their name are giving us live temp info - if strings.Contains(sensor.SensorKey, "input") { + if strings.Contains(sensor.SensorKey, "input") && sensor.Temperature != 0 { // removes '_input' from the end of the sensor name label := sensor.SensorKey[:strings.Index(sensor.SensorKey, "_input")] self.Data[label] = int(sensor.Temperature) diff --git a/src/widgets/temp_windows.go b/src/widgets/temp_windows.go index 99c2a87..e6dbb46 100644 --- a/src/widgets/temp_windows.go +++ b/src/widgets/temp_windows.go @@ -7,6 +7,8 @@ import ( func (self *Temp) update() { sensors, _ := psHost.SensorsTemperatures() for _, sensor := range sensors { - self.Data[sensor.SensorKey] = int(sensor.Temperature) + if sensor.Temperature != 0 { + self.Data[sensor.SensorKey] = int(sensor.Temperature) + } } }