Skip to content

Commit f7840ca

Browse files
committed
Add notes for rollovers
1 parent 3e52307 commit f7840ca

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

plugwise_usb/nodes/helpers/pulses.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,13 @@ def collected_pulses(
160160
return (None, None)
161161

162162
if is_consumption and self._rollover_consumption:
163+
# consumption-pulses reset every hour - pulses just before rollover are lost?
163164
_LOGGER.debug("collected_pulses 2 | %s | _rollover_consumption", self._mac)
164165
return (None, None)
165166
if not is_consumption and self._rollover_production:
167+
# production-pulses do not reset every hour but at the max counter value - double-check
168+
# if this is correct the pulses lost at rollover can be calculated:
169+
# max-counter - prev-value + counter after reset
166170
_LOGGER.debug("collected_pulses 2 | %s | _rollover_production", self._mac)
167171
return (None, None)
168172

0 commit comments

Comments
 (0)