feat: add voltage param to minerdata
This commit is contained in:
@@ -58,6 +58,10 @@ EPIC_DATA_LOC = DataLocations(
|
||||
"_get_wattage",
|
||||
[WebAPICommand("web_summary", "summary")],
|
||||
),
|
||||
str(DataOptions.WATTAGE): DataFunction(
|
||||
"_get_voltage",
|
||||
[WebAPICommand("web_summary", "summary")],
|
||||
),
|
||||
str(DataOptions.FANS): DataFunction(
|
||||
"_get_fans",
|
||||
[WebAPICommand("web_summary", "summary")],
|
||||
@@ -217,6 +221,20 @@ class ePIC(BaseMiner):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def _get_voltage(self, web_summary: dict = None) -> Optional[float]:
|
||||
if web_summary is None:
|
||||
try:
|
||||
web_summary = await self.web.summary()
|
||||
except APIError:
|
||||
pass
|
||||
|
||||
if web_summary is not None:
|
||||
try:
|
||||
voltage = web_summary["Power Supply Stats"]["Output Voltage"]
|
||||
return voltage
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
async def _get_hashrate(self, web_summary: dict = None) -> Optional[float]:
|
||||
if web_summary is None:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user