We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b962b1 commit dd8a151Copy full SHA for dd8a151
plugwise_usb/nodes/helpers/pulses.py
@@ -167,7 +167,9 @@ def pulse_counter_reset(self) -> bool:
167
def reset(self) -> None:
168
"""Reset PulseCollection after an energy-logs reset."""
169
# Keep mac, wipe every other attribute.
170
- self.__dict__.update(PulseCollection(self._mac).__dict__)
+ fresh_state = PulseCollection(self._mac).__dict__
171
+ self.__dict__.clear() # remove *all* existing keys first
172
+ self.__dict__.update(fresh_state)
173
174
def collected_pulses(
175
self, from_timestamp: datetime, is_consumption: bool
0 commit comments