bug: update get_miner to work with latest whatsminer version.

This commit is contained in:
UpstreamData
2023-10-05 10:17:45 -06:00
parent 4bafde9da7
commit 5ca39b6fe7

View File

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