fix a bug with incorrect types in miner data
This commit is contained in:
@@ -71,11 +71,11 @@ class MinerData:
|
|||||||
model: str = "Unknown"
|
model: str = "Unknown"
|
||||||
hostname: str = "Unknown"
|
hostname: str = "Unknown"
|
||||||
hashrate: float = 0
|
hashrate: float = 0
|
||||||
left_board_hashrate: float = 0
|
left_board_hashrate: float = 0.0
|
||||||
center_board_hashrate: float = 0
|
center_board_hashrate: float = 0.0
|
||||||
right_board_hashrate: float = 0
|
right_board_hashrate: float = 0.0
|
||||||
temperature_avg: int = field(init=False)
|
temperature_avg: int = field(init=False)
|
||||||
env_temp: float = 0
|
env_temp: float = 0.0
|
||||||
left_board_temp: int = 0
|
left_board_temp: int = 0
|
||||||
left_board_chip_temp: int = 0
|
left_board_chip_temp: int = 0
|
||||||
center_board_temp: int = 0
|
center_board_temp: int = 0
|
||||||
@@ -200,7 +200,7 @@ class MinerData:
|
|||||||
field_data.append(f"{attribute}={str(self[attribute]).lower()}")
|
field_data.append(f"{attribute}={str(self[attribute]).lower()}")
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], int):
|
if isinstance(self[attribute], int):
|
||||||
field_data.append(f"{attribute}={self[attribute]}i")
|
field_data.append(f"{attribute}={self[attribute]}")
|
||||||
continue
|
continue
|
||||||
if isinstance(self[attribute], float):
|
if isinstance(self[attribute], float):
|
||||||
field_data.append(f"{attribute}={self[attribute]}")
|
field_data.append(f"{attribute}={self[attribute]}")
|
||||||
|
|||||||
Reference in New Issue
Block a user