Skip to content

Commit

Permalink
docs/troubleshooting: fix missing await
Browse files Browse the repository at this point in the history
Also fix missing `:` and don't create unnecessary instance of BleakScanner.

Fixes: #1334
  • Loading branch information
dlech committed Jun 14, 2023
1 parent 294e731 commit 2abe80d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/troubleshooting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ Python::
from bleak.backends.device import BLEDevice


async def find_all_devices_services()
scanner = BleakScanner()
devices: Sequence[BLEDevice] = scanner.discover(timeout=5.0)
async def find_all_devices_services():
devices: Sequence[BLEDevice] = await BleakScanner.discover(timeout=5.0)

for d in devices:
async with BleakClient(d) as client:
print(client.services)
Expand Down

0 comments on commit 2abe80d

Please sign in to comment.