Skip to content

Commit 4851d67

Browse files
committed
Directly return the percentage -value
1 parent d4c987f commit 4851d67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugwise/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,8 @@ def format_measure(measure, unit):
9393
measure = int(measure)
9494
except ValueError:
9595
if unit == PERCENTAGE and float(measure) > 0:
96-
measure = int(float(measure) * 100)
96+
return = int(float(measure) * 100)
97+
9798
if unit == ENERGY_KILO_WATT_HOUR:
9899
measure = float(measure) / 1000
99100
try:

0 commit comments

Comments
 (0)