From 2ef6ad9ac1e197804f5c00650fe64138867d4e0c Mon Sep 17 00:00:00 2001 From: Brian Berg Date: Tue, 16 Jun 2020 23:43:13 +0000 Subject: [PATCH] fix(sensor): fix rig temperature sensor state - was short-circuiting after first device - ignore inactive (-1) temperatures --- custom_components/nicehash/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/nicehash/sensor.py b/custom_components/nicehash/sensor.py index b056353..f6f1116 100644 --- a/custom_components/nicehash/sensor.py +++ b/custom_components/nicehash/sensor.py @@ -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