bug: fix whatsminer identification to work with backwards incompatible changes in API 2.0.5.

This commit is contained in:
UpstreamData
2023-09-28 15:41:53 -06:00
parent b7dda5bf87
commit 6f0c6f6284

View File

@@ -753,7 +753,7 @@ class MinerFactory:
async def get_miner_model_whatsminer(self, ip: str):
sock_json_data = await self.send_api_command(ip, "devdetails")
try:
miner_model = sock_json_data["DEVDETAILS"][0]["Model"]
miner_model = sock_json_data["DEVDETAILS"][0]["Model"].replace("_", "")
return miner_model
except (TypeError, LookupError):