Skip to content

Commit 343c37c

Browse files
committed
Add extra debug logging in circle.py
1 parent b275689 commit 343c37c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ async def power_update(self) -> PowerStatistics | None:
279279
280280
Return power usage or None if retrieval failed
281281
"""
282+
_LOGGER.debug("Requesting a PowerStatistics update for %s", self._mac_in_str)
282283
# Debounce power
283284
if self.skip_update(self._power, MINIMAL_POWER_UPDATE):
284285
return self._power
@@ -334,6 +335,7 @@ def _log_no_energy_stats_update(self) -> None:
334335
@raise_calibration_missing
335336
async def energy_update(self) -> EnergyStatistics | None: # noqa: PLR0911 PLR0912
336337
"""Return updated energy usage statistics."""
338+
_LOGGER.debug("Requesting an EnergyStatistics update for %s", self._mac_in_str)
337339
if self._current_log_address is None:
338340
_LOGGER.debug(
339341
"Unable to update energy logs for node %s because the current log address is unknown.",
@@ -354,6 +356,9 @@ async def energy_update(self) -> EnergyStatistics | None: # noqa: PLR0911 PLR09
354356
self._current_log_address
355357
)
356358

359+
_LOGGER.debug(
360+
"Rollover status for %s: %s", self._mac_in_str, self._energy_counters.log_rollover
361+
)
357362
if self._energy_counters.log_rollover:
358363
# Try updating node_info to collect the updated energy log address
359364
if await self.node_info_update() is None:

0 commit comments

Comments
 (0)