Skip to content

Commit bfb7cc5

Browse files
committed
Formatting
1 parent 1366366 commit bfb7cc5

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
@@ -205,6 +205,7 @@ def _collect_pulses_from_logs(
205205
if self._logs is None:
206206
_LOGGER.debug("_collect_pulses_from_logs | %s | self._logs=None", self._mac)
207207
return None
208+
208209
if is_consumption:
209210
if self._last_log_consumption_timestamp is None:
210211
_LOGGER.debug(
@@ -223,6 +224,7 @@ def _collect_pulses_from_logs(
223224
return None
224225
if from_timestamp > self._last_log_production_timestamp:
225226
return 0
227+
226228
missing_logs = self._logs_missing(from_timestamp)
227229
if missing_logs is None or missing_logs:
228230
_LOGGER.debug(
@@ -233,14 +235,14 @@ def _collect_pulses_from_logs(
233235
return None
234236

235237
log_pulses = 0
236-
237238
for log_item in self._logs.values():
238239
for slot_item in log_item.values():
239240
if (
240241
slot_item.is_consumption == is_consumption
241242
and slot_item.timestamp > from_timestamp
242243
):
243244
log_pulses += slot_item.pulses
245+
244246
return log_pulses
245247

246248
def update_pulse_counter(

0 commit comments

Comments
 (0)