Skip to content

Commit d6c116d

Browse files
committed
Make sure to call power_update() when there are 2 or more missing_logs
required because of the removal of the power_update() call in get_state()
1 parent 5f0fdc5 commit d6c116d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

plugwise_usb/nodes/circle.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,10 @@ async def energy_update(self) -> EnergyStatistics | None: # noqa: PLR0911 PLR09
429429
)
430430
return self._energy_counters.energy_statistics
431431

432+
# Perform a power_update() when there are more missing logs
433+
# Required because calling power_update() in get_state() has been removed
434+
await self.power_update()
435+
432436
# Create task to request remaining missing logs
433437
if (
434438
self._retrieve_energy_logs_task is None

0 commit comments

Comments
 (0)