feature: add is_mining to MinerData and get_data.

This commit is contained in:
UpstreamData
2023-06-23 14:47:12 -06:00
parent f2abe9fd9e
commit f6d35888fe
11 changed files with 22 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ class MinerData:
errors: A list of errors on the miner.
fault_light: Whether the fault light is on as a boolean.
efficiency: Efficiency of the miner in J/TH (Watts per TH/s). Calculated automatically.
is_mining: Whether the miner is mining.
"""
ip: str
@@ -133,6 +134,7 @@ class MinerData:
] = field(default_factory=list)
fault_light: Union[bool, None] = None
efficiency: int = field(init=False)
is_mining: bool = True
@classmethod
def fields(cls):