Skip to content

Commit e0d4052

Browse files
committed
Remove double resetting of log_pulses
Also happens when slot_item.timestamp > from_timestamp
1 parent 6a5aeac commit e0d4052

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,6 @@ def _collect_pulses_from_logs(
234234
self._mac,
235235
)
236236
return None
237-
238-
timestamp = self._last_log_consumption_timestamp
239-
if (
240-
from_timestamp > timestamp
241-
and self._cons_pulsecounter_reset
242-
):
243-
_LOGGER.debug("_collect_pulses_from_logs | resetting log_pulses to 0")
244-
return 0
245237
else:
246238
if self._last_log_production_timestamp is None:
247239
_LOGGER.debug(
@@ -250,14 +242,6 @@ def _collect_pulses_from_logs(
250242
)
251243
return None
252244

253-
timestamp = self._last_log_production_timestamp
254-
if (
255-
from_timestamp > timestamp
256-
and self._prod_pulsecounter_reset
257-
):
258-
_LOGGER.debug("_collect_pulses_from_logs | resetting log_pulses to 0")
259-
return 0
260-
261245
missing_logs = self._logs_missing(from_timestamp)
262246
if missing_logs is None or missing_logs:
263247
_LOGGER.debug(

0 commit comments

Comments
 (0)