use None instead of -1 for temps and wattages (#55)

* use `None` instead of `-1` for temps and wattages
this way it's easier for other tools like HomeAssistant to understand if the temperature is really negative or not available

* also handle cases where we look for `-1`
This commit is contained in:
Michael Schmid
2023-07-07 14:06:24 -04:00
committed by GitHub
parent 58234fcf7f
commit 409b2527f0
3 changed files with 12 additions and 12 deletions

View File

@@ -58,7 +58,7 @@ class HiveonT9(Hiveon, T9):
hashrate = 0
chips = 0
for chipset in board_map[board]:
if hashboard.chip_temp == -1:
if hashboard.chip_temp == None:
try:
hashboard.board_temp = api_stats["STATS"][1][f"temp{chipset}"]
hashboard.chip_temp = api_stats["STATS"][1][f"temp2_{chipset}"]