Skip to content

Commit

Permalink
fix: Correctly read battery packs' values - wait before setting the t…
Browse files Browse the repository at this point in the history
…arget pack number Patrick762#109
  • Loading branch information
AChep committed Jun 29, 2024
1 parent 23551ae commit 0f33a31
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ async def read_data(
_LOGGER.warning("Pack polling failed (pack_num %i doesn't match expected %i)", set_pack, pack)
continue

if self.bluetti_device.pack_num_max > 1:
# We need to wait after switching packs
# for the data to be available
await asyncio.sleep(5)

for command in pack_commands:
# Request & parse result for each pack
try:
Expand Down

0 comments on commit 0f33a31

Please sign in to comment.