Using the bluetooth library

Hi,
my integration is using the bluetooth library like so:

scanner = bluetooth.async_get_scanner(hass)
ble_device = scanner.find_device_by_address(mac)
device = BleakClient(ble_device)

This feels a bit weird, as BleakClient is from a different library. Isn’t there a wrapper of some kind in the bluetooth library? Or is this how it is supposed to be done?

1 Like