Skip to content

Commit f3e15d3

Browse files
committed
Correctly call format_measure
1 parent 4ad67d7 commit f3e15d3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise/smile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ def get_power_data_from_location(self, loc_id):
869869
key_string = f"{measurement}_{peak}_{log_found}"
870870
net_string = f"net_electricity_{log_found}"
871871
val = loc_logs.find(locator).text
872-
f_val = format_measure(val)
872+
f_val = format_measure(val, None)
873873
if "gas" in measurement:
874874
key_string = f"{measurement}_{log_found}"
875875
f_val = float(f"{round(float(val), 3):.3f}")
@@ -1088,7 +1088,7 @@ def get_object_value(self, obj_type, obj_id, measurement):
10881088
f'[type="{measurement}"]/period/measurement'
10891089
)
10901090
if search.find(locator) is not None:
1091-
val = format_measure(search.find(locator).text)
1091+
val = format_measure(search.find(locator).text, None)
10921092
return val
10931093

10941094
return None

0 commit comments

Comments
 (0)