Skip to content

Commit 2abe80d

Browse files
committed
docs/troubleshooting: fix missing await
Also fix missing `:` and don't create unnecessary instance of BleakScanner. Fixes: #1334
1 parent 294e731 commit 2abe80d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/troubleshooting.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ Python::
103103
from bleak.backends.device import BLEDevice
104104

105105

106-
async def find_all_devices_services()
107-
scanner = BleakScanner()
108-
devices: Sequence[BLEDevice] = scanner.discover(timeout=5.0)
106+
async def find_all_devices_services():
107+
devices: Sequence[BLEDevice] = await BleakScanner.discover(timeout=5.0)
108+
109109
for d in devices:
110110
async with BleakClient(d) as client:
111111
print(client.services)

0 commit comments

Comments
 (0)