Skip to content

Commit 59e76dd

Browse files
committed
Output production-statistics as positive values
1 parent cef0b64 commit 59e76dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ def collected_pulses(
207207
is_consumption,
208208
timestamp,
209209
)
210-
return (pulses + log_pulses, timestamp)
210+
211+
# Always return positive values of energy_statistics
212+
return (abs(pulses + log_pulses), timestamp)
211213

212214
def _collect_pulses_from_logs(
213215
self, from_timestamp: datetime, is_consumption: bool

0 commit comments

Comments
 (0)