mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-19 07:16:29 +00:00
Document bluetooth.async_get_scanner (#1409)
This commit is contained in:
parent
e998f5b7c6
commit
3b50de65d9
@ -77,6 +77,15 @@ entry.async_on_unload(
|
||||
)
|
||||
```
|
||||
|
||||
### Fetch the shared BleakScanner instance
|
||||
|
||||
Integrations that need an instance of a `BleakScanner` should call the `bluetooth.async_get_scanner` API. This API returns a wrapper around a single `BleakScanner` that allows integrations to share without overloading the system.
|
||||
|
||||
```python
|
||||
from homeassistant.components import bluetooth
|
||||
|
||||
scanner = bluetooth.async_get_scanner(hass)
|
||||
```
|
||||
|
||||
### Subscribing to unavailable callbacks
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user