Skip to content

Commit 29a9252

Browse files
committed
Don't update production rollover when no production
1 parent 9c59cbd commit 29a9252

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ def _update_rollover(self) -> None:
288288
):
289289
# Unable to determine rollover
290290
return
291+
291292
if self._pulses_timestamp > self._next_log_consumption_timestamp:
292293
self._rollover_consumption = True
293294
_LOGGER.debug(
@@ -320,6 +321,10 @@ def _update_rollover(self) -> None:
320321
):
321322
# Unable to determine rollover
322323
return
324+
325+
if not self._log_production:
326+
return
327+
323328
if self._pulses_timestamp > self._next_log_production_timestamp:
324329
self._rollover_production = True
325330
_LOGGER.debug(

0 commit comments

Comments
 (0)