developers.home-assistant/blog/2022-09-16-bluetooth-unavai...

666 B

author authorURL title
J. Nick Koston https://github.com/bdraco Bluetooth async_track_unavailable API changes for 2022.10

For Home Assistant Core 2022.10 we have changed the async_track_unavailable bluetooth API to send the last BluetoothServiceInfoBleak to the callback instead of the address.

Below is a new example of the usage:

from homeassistant.components import bluetooth

def _unavailable_callback(info: bluetooth.BluetoothServiceInfoBleak) -> None:
    _LOGGER.debug("%s is no longer seen", info.address)
   
cancel = bluetooth.async_track_unavailable(hass, _unavailable_callback, "44:44:33:11:23:42", connectable=True)