fix(sensor): fix rig temperature sensor state
- was short-circuiting after first device - ignore inactive (-1) temperatures
This commit is contained in:
parent
6c0a39e7c7
commit
2ef6ad9ac1
@ -196,10 +196,10 @@ class NiceHashRigTemperatureSensor(Entity):
|
||||
self._temps = []
|
||||
for device in devices:
|
||||
temp = int(device.get("temperature"))
|
||||
self._temps.append(temp)
|
||||
if temp < 0:
|
||||
# Ignore inactive devices
|
||||
continue
|
||||
self._temps.append(temp)
|
||||
if temp > highest_temp:
|
||||
highest_temp = temp
|
||||
return highest_temp
|
||||
|
Loading…
Reference in New Issue
Block a user