Skip to content

Commit 2a75755

Browse files
committed
Formatting
1 parent 06ad566 commit 2a75755

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugwise_usb/nodes/helpers/counter.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,10 @@ def energy(self) -> float | None:
260260
"""Total energy (in kWh) since last reset."""
261261
if self._pulses is None or self._calibration is None:
262262
return None
263+
263264
if self._pulses == 0:
264265
return 0.0
266+
265267
# Handle both positive and negative pulses values
266268
negative = False
267269
if self._pulses < 0:
@@ -284,6 +286,7 @@ def energy(self) -> float | None:
284286
calc_value = corrected_pulses / PULSES_PER_KW_SECOND / HOUR_IN_SECONDS
285287
if negative:
286288
calc_value = -calc_value
289+
287290
return calc_value
288291

289292
@property

0 commit comments

Comments
 (0)