From 50afe1a1d0b8ac263ba70032cd0b1f026e8fadc7 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Wed, 14 Jun 2023 09:23:54 -0500 Subject: [PATCH] docs/troubleshooting: fix missing await Fixes: https://github.com/hbldh/bleak/issues/1334 --- docs/troubleshooting.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/troubleshooting.rst b/docs/troubleshooting.rst index 0b139522..6d1f1e26 100644 --- a/docs/troubleshooting.rst +++ b/docs/troubleshooting.rst @@ -103,9 +103,9 @@ Python:: from bleak.backends.device import BLEDevice - async def find_all_devices_services() + async def find_all_devices_services(): scanner = BleakScanner() - devices: Sequence[BLEDevice] = scanner.discover(timeout=5.0) + devices: Sequence[BLEDevice] = await scanner.discover(timeout=5.0) for d in devices: async with BleakClient(d) as client: print(client.services)