From ba9ac0c47ef9b26f84d1eddab038c1cd669abb03 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 23 Dec 2023 00:13:48 -1000 Subject: [PATCH] Update Bluetooth docs for async_register_scanner changes (#2021) --- docs/core/bluetooth/api.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/core/bluetooth/api.md b/docs/core/bluetooth/api.md index ba6281be..1fb6e7f0 100644 --- a/docs/core/bluetooth/api.md +++ b/docs/core/bluetooth/api.md @@ -228,10 +228,12 @@ Integrations that provide a Bluetooth adapter should add `bluetooth` in [`depend To register an external scanner, call the `bluetooth.async_register_scanner` API. The scanner must inherit from `BaseHaScanner`. +If the scanner needs connection slot management to avoid overloading the adapter, pass the number of connection slots as an integer value via the `connection_slots` argument. + ```python from homeassistant.components import bluetooth -cancel = bluetooth.async_register_scanner(hass, scanner, connectable=False) +cancel = bluetooth.async_register_scanner(hass, scanner, connection_slots=slots) ``` The scanner will need to feed advertisement data to the central Bluetooth manager in the form of `BluetoothServiceInfoBleak` objects. The callback needed to send the data to the central manager can be obtained with the `bluetooth.async_get_advertisement_callback` API.