Skip to content

Commit d912472

Browse files
authored
Merge pull request #128 from dirixmjm/main
make sure log addresses are unique inside history_failed_address
2 parents da17237 + b90e7fb commit d912472

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

plugwise_usb/controller.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,9 @@ def send(
128128
):
129129
"""Queue request message to be sent into Plugwise Zigbee network."""
130130
_LOGGER.debug(
131-
"Queue %s to be send with retry counter %s and priority %s",
131+
"Queue %s to be send to %s with retry counter %s and priority %s",
132132
request.__class__.__name__,
133+
request.mac,
133134
str(retry_counter),
134135
str(priority),
135136
)

plugwise_usb/nodes/circle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ def _collect_energy_pulses(self, start_utc: datetime, end_utc: datetime):
419419
)
420420
else:
421421
_mem_address = self._energy_timestamp_memory_address(_log_timestamp)
422-
self._energy_history_failed_address.append(_mem_address)
422+
if self._energy_history_failed_address.count(_mem_address) == 0:
423+
self._energy_history_failed_address.append(_mem_address)
423424
_LOGGER.info(
424425
"_collect_energy_pulses for %s at %s not found, request counter from memory %s (from mem=%s, slot=%s, timestamp=%s)",
425426
self.mac,

0 commit comments

Comments
 (0)