We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbca90b commit 8568e93Copy full SHA for 8568e93
plugwise/util.py
@@ -14,6 +14,7 @@
14
15
from .constants import (
16
ARBITRARY_DATE,
17
+ ELECTRIC_POTENTIAL_VOLT,
18
ENERGY_KILO_WATT_HOUR,
19
HW_MODELS,
20
LOGADDR_OFFSET,
@@ -118,6 +119,8 @@ def format_measure(measure: str, unit: str) -> float | int | bool:
118
119
120
if unit in SPECIAL_FORMAT:
121
result = float(f"{round(float_measure, 3):.3f}")
122
+ elif unit == ELECTRIC_POTENTIAL_VOLT:
123
+ result = float(f"{round(float_measure, 1):.1f}")
124
else:
125
if abs(float_measure) < 10:
126
result = float(f"{round(float_measure, 2):.2f}")
0 commit comments