Skip to content

Commit 3ba634b

Browse files
committed
Improve energy_log_update() output logic
1 parent cb5324a commit 3ba634b

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
@@ -521,6 +521,7 @@ async def energy_log_update(self, address: int | None) -> bool:
521521
"""Request energy log statistics from node. Returns true if successful."""
522522
if address is None:
523523
return False
524+
524525
_LOGGER.debug(
525526
"Request of energy log at address %s for node %s",
526527
str(address),
@@ -570,8 +571,9 @@ async def energy_log_update(self, address: int | None) -> bool:
570571
"Saving energy record update to cache for %s", self._mac_in_str
571572
)
572573
await self.save_cache()
574+
return True
573575

574-
return True
576+
return False
575577

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

0 commit comments

Comments
 (0)