Skip to content

Commit 399ffb4

Browse files
author
autoruff
committed
fixup: improve-energy-collection Python code reformatted using Ruff
1 parent 0e2252a commit 399ffb4

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
@@ -471,7 +471,9 @@ async def _get_initial_energy_logs(self) -> None:
471471
# When both consumption and production are measured, 1 address contains data from 2 hours
472472
factor = 4 if self.energy_production_interval is not None else 2
473473
max_addresses_to_collect = int(MAX_LOG_HOURS / factor)
474-
total_addresses = min(max_addresses_to_collect, ceil(datetime.now(tz=UTC).hour / factor) + 1)
474+
total_addresses = min(
475+
max_addresses_to_collect, ceil(datetime.now(tz=UTC).hour / factor) + 1
476+
)
475477
log_address = self._current_log_address
476478
while total_addresses > 0:
477479
result = await self.energy_log_update(log_address)

0 commit comments

Comments
 (0)