File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
plugwise_usb/nodes/helpers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -191,13 +191,14 @@ def collected_pulses(
191191 delta_cons_pulses = self ._pulses_consumption - self ._prev_pulses_consumption
192192 if self ._hourly_reset_passed :
193193 pulses = delta_cons_pulses + self ._hourly_reset_pulses
194+ self ._hourly_reset_pulses = pulses
194195 elif self ._hourly_reset :
195196 pulses = delta_cons_pulses
196197 self ._hourly_reset_pulses = pulses
197198 self ._hourly_reset = False
198199 self ._hourly_reset_passed = True
199200 elif self ._pulsecounter_reset :
200- pulses = self ._pulses_consumption + self ._prev_pulses_consumption
201+ pulses = self ._pulses_consumption + self ._hourly_reset_pulses
201202 self ._pulsecounter_reset = False
202203 else :
203204 pulses = self ._prev_pulses_consumption + delta_cons_pulses
@@ -270,7 +271,7 @@ def _collect_pulses_from_logs(
270271
271272 timestamp = self ._last_log_production_timestamp
272273
273- if from_timestamp > timestamp and not self ._hourly_reset_passed :
274+ if from_timestamp > timestamp and not self ._hourly_reset_passed and not self . _pulsecounter_reset :
274275 self ._hourly_reset = True
275276
276277 missing_logs = self ._logs_missing (from_timestamp )
You can’t perform that action at this time.
0 commit comments