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 14374bf commit 79bb8e0Copy full SHA for 79bb8e0
plugwise/util.py
@@ -73,7 +73,7 @@ def escape_illegal_xml_characters(xmldata):
73
74
def format_measure(measure, unit):
75
"""Format measure to correct type."""
76
- if unit == PERCENTAGE:
+ if unit == PERCENTAGE and measure > 0:
77
measure = int(measure * 100)
78
if unit == ENERGY_KILO_WATT_HOUR:
79
measure = measure / 1000
0 commit comments