Skip to content

Commit 2025ccc

Browse files
committed
Improve energy_log_update() output logic
1 parent 2337055 commit 2025ccc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugwise_usb/nodes/circle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ async def energy_log_update(self, address: int | None) -> bool:
522522
"""Request energy log statistics from node. Returns true if successful."""
523523
if address is None:
524524
return False
525+
525526
_LOGGER.debug(
526527
"Request of energy log at address %s for node %s",
527528
str(address),
@@ -571,8 +572,9 @@ async def energy_log_update(self, address: int | None) -> bool:
571572
"Saving energy record update to cache for %s", self._mac_in_str
572573
)
573574
await self.save_cache()
575+
return True
574576

575-
return True
577+
return False
576578

577579
async def _energy_log_records_load_from_cache(self) -> bool:
578580
"""Load energy_log_record from cache."""

0 commit comments

Comments
 (0)