Merge pull request #1423 from elupus/ble/rediscover

Add mention of async_rediscover_address
This commit is contained in:
Joakim Plate 2022-08-05 14:49:52 +02:00 committed by GitHub
commit f886695cff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,17 @@ from homeassistant.components import bluetooth
service_infos = bluetooth.async_discovered_service_info(hass)
```
### Triggering rediscovery of devices
When a configuration entry or device is removed from Home Assistant, trigger rediscovery of its address to make sure they are available to be set up without restarting Home Assistant. You can make use of the Bluetooth connection property of the device registry if your integration manages multiple devices per configuration entry.
```python
from homeassistant.components import bluetooth
bluetooth.async_rediscover_address(hass, "44:44:33:11:23:42")
```
### Waiting for a specific advertisement
To wait for a specific advertisement, call the `bluetooth.async_process_advertisements` API.