Skip to content

Commit a79362b

Browse files
committed
Add debug-logging to _energy_log_records_load_from_cache()
1 parent 6f9d06e commit a79362b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ async def _energy_log_records_load_from_cache(self) -> bool:
535535
return False
536536
restored_logs: dict[int, list[int]] = {}
537537
if cache_data == "":
538+
_LOGGER.debug("Cache-record is empty")
538539
return False
539540

540541
log_data = cache_data.split("|")
@@ -568,6 +569,7 @@ async def _energy_log_records_load_from_cache(self) -> bool:
568569

569570
# Create task to retrieve remaining (missing) logs
570571
if self._energy_counters.log_addresses_missing is None:
572+
_LOGGER.debug("Cache | missing log addresses is None")
571573
return False
572574

573575
if len(self._energy_counters.log_addresses_missing) > 0:
@@ -577,6 +579,7 @@ async def _energy_log_records_load_from_cache(self) -> bool:
577579
self._retrieve_energy_logs_task = create_task(
578580
self.get_missing_energy_logs()
579581
)
582+
_LOGGER.debug("Cache | creating tasks to obtain missing energy logs")
580583
return False
581584

582585
return True

0 commit comments

Comments
 (0)