Skip to content

Commit 518ae20

Browse files
committed
Correct
1 parent 53bbd1b commit 518ae20

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def collected_pulses(
205205
is_consumption,
206206
timestamp,
207207
)
208-
return (pulses + log_pulses, timestamp)
208+
return (abs(pulses + log_pulses), timestamp)
209209

210210
def _collect_pulses_from_logs(
211211
self, from_timestamp: datetime, is_consumption: bool
@@ -243,7 +243,7 @@ def _collect_pulses_from_logs(
243243
):
244244
log_pulses += slot_item.pulses
245245

246-
return abs(log_pulses)
246+
return log_pulses
247247

248248
def update_pulse_counter(
249249
self, pulses_consumed: int, pulses_produced: int, timestamp: datetime

0 commit comments

Comments
 (0)