add getting mac for whatsminers

This commit is contained in:
UpstreamData
2022-05-16 15:00:52 -06:00
parent e091863aa7
commit 40bacbf41c
3 changed files with 12 additions and 1 deletions

View File

@@ -72,6 +72,15 @@ class BTMiner(BaseMiner):
logging.debug(f"Found board data for {self}: {boards}")
return boards
async def get_mac(self):
mac = ""
data = await self.api.get_miner_info()
if data:
if "Msg" in data.keys():
if "mac" in data["Msg"].keys():
mac = data["Msg"]["mac"]
return str(mac).upper()
async def get_data(self):
data = {
"IP": str(self.ip),