File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugwise_usb/nodes/helpers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -299,8 +299,7 @@ def update_pulse_counter(
299299 production_counter_reset = False
300300 self ._pulses_timestamp = timestamp
301301 self ._pulsecounter_reset = False
302- # No rollover based on time, check rollover based on counter reset
303- # Required for special cases like nodes which have been powered off for several days
302+ self ._update_rollover ()
304303 if (
305304 self ._pulses_consumption is not None
306305 and self ._pulses_consumption > pulses_consumed
@@ -317,7 +316,8 @@ def update_pulse_counter(
317316 _LOGGER .debug ("update_pulse_counter | pulsecounter reset" )
318317 self ._pulsecounter_reset = True
319318
320- self ._update_rollover ()
319+ # No rollover based on time, check rollover based on counter reset
320+ # Required for special cases like nodes which have been powered off for several days
321321 if not (self ._rollover_consumption or self ._rollover_production ):
322322 if consumption_counter_reset :
323323 _LOGGER .debug ("update_pulse_counter | rollover consumption" )
You can’t perform that action at this time.
0 commit comments