Skip to content

Commit 693478b

Browse files
committed
Don't update production rollover when no production
1 parent 71b36c6 commit 693478b

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
@@ -304,6 +304,7 @@ def _update_rollover(self) -> None:
304304
):
305305
# Unable to determine rollover
306306
return
307+
307308
if self._pulses_timestamp > self._next_log_consumption_timestamp:
308309
self._rollover_consumption = True
309310
_LOGGER.debug(
@@ -336,6 +337,10 @@ def _update_rollover(self) -> None:
336337
):
337338
# Unable to determine rollover
338339
return
340+
341+
if not self._log_production:
342+
return
343+
339344
if self._pulses_timestamp > self._next_log_production_timestamp:
340345
self._rollover_production = True
341346
_LOGGER.debug(

0 commit comments

Comments
 (0)