Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e01f7517b | ||
|
|
569f659fac | ||
|
|
dd9c6f1f63 | ||
|
|
0958f47cfe | ||
|
|
3820b40f44 |
@@ -64,6 +64,10 @@ AVALON_DATA_LOC = DataLocations(
|
||||
"_get_fault_light",
|
||||
[RPCAPICommand("api_stats", "stats")],
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"_get_uptime",
|
||||
[RPCAPICommand("api_stats", "stats")],
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -70,6 +70,10 @@ VNISH_DATA_LOC = DataLocations(
|
||||
"_get_fans",
|
||||
[RPCAPICommand("api_stats", "stats")],
|
||||
),
|
||||
str(DataOptions.UPTIME): DataFunction(
|
||||
"_get_uptime",
|
||||
[RPCAPICommand("api_stats", "stats")],
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
@@ -163,7 +167,7 @@ class VNish(BMMiner):
|
||||
if web_summary is not None:
|
||||
try:
|
||||
wattage = web_summary["miner"]["power_usage"]
|
||||
wattage = round(wattage * 1000)
|
||||
wattage = round(wattage)
|
||||
return wattage
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
@@ -89,6 +89,9 @@ class DataFunction:
|
||||
Union[RPCAPICommand, WebAPICommand, GRPCCommand, GraphQLCommand]
|
||||
] = field(default_factory=list)
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self
|
||||
|
||||
|
||||
DataLocations = make_dataclass(
|
||||
"DataLocations",
|
||||
@@ -96,7 +99,7 @@ DataLocations = make_dataclass(
|
||||
(
|
||||
enum_value.value,
|
||||
DataFunction,
|
||||
field(default_factory=lambda: DataFunction(enum_value.default_command())),
|
||||
field(default_factory=DataFunction(enum_value.default_command())),
|
||||
)
|
||||
for enum_value in DataOptions
|
||||
],
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "pyasic"
|
||||
version = "0.48.1"
|
||||
version = "0.48.3"
|
||||
description = "A simplified and standardized interface for Bitcoin ASICs."
|
||||
authors = ["UpstreamData <brett@upstreamdata.ca>"]
|
||||
repository = "https://github.com/UpstreamData/pyasic"
|
||||
|
||||
Reference in New Issue
Block a user