diff --git a/pyasic/data/__init__.py b/pyasic/data/__init__.py index 82a1f664..227e1b35 100644 --- a/pyasic/data/__init__.py +++ b/pyasic/data/__init__.py @@ -381,7 +381,7 @@ class MinerData(BaseModel): return f'{key}="{value}"' def serialize_algo_hash_rate(key: str, value: AlgoHashRateType) -> str: - return f"{key}={float(value)}" + return f"{key}={round(float(value), 2)}" def serialize_list(key: str, value: list[Any]) -> str | None: if len(value) == 0: diff --git a/pyasic/data/boards.py b/pyasic/data/boards.py index 07333a2c..47153087 100644 --- a/pyasic/data/boards.py +++ b/pyasic/data/boards.py @@ -84,7 +84,7 @@ class HashBoard(BaseModel): return f'{key}="{value}"' def serialize_algo_hash_rate(key: str, value: AlgoHashRateType) -> str: - return f"{key}={float(value)}" + return f"{key}={round(float(value), 2)}" def serialize_bool(key: str, value: bool): return f"{key}={value}"