habluetooth is a Python library providing high-availability Bluetooth scanning and device management, built on top of Bleak. It aims to offer robust Bluetooth integration, often used in home automation contexts. The current version is 6.0.0. The project maintains an active and frequent release cadence, often with multiple updates per month, incorporating new features and bug fixes.
pip install habluetoothVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the `BluetoothManager`, set up a `HaBleakScannerWrapper`, and asynchronously iterate over discovered Bluetooth devices and their advertisement data. Run this script to see local Bluetooth devices and their basic information.
Update `HaBleakScannerWrapper` usage to leverage the new async iterator patterns (e.g., `scanner.advertisement_data`) or `discovered_devices_and_advertisement_data` methods, as demonstrated in the quickstart. Direct callback registration is no longer supported.
Ensure your development and deployment environments are running Python 3.11 or a more recent version. Consider using virtual environments to manage Python versions effectively.
For production or stable environments, consider pinning the `habluetooth` version in your `requirements.txt` to a specific minor version (e.g., `habluetooth~=6.0`) to avoid unexpected changes from newer releases. Regularly review the GitHub release notes before updating.
Install the library using pip: `pip install habluetooth`.
Update your code to use the new async iterator patterns for scanning, such as `scanner.advertisement_data` or `discovered_devices_and_advertisement_data` methods, as direct callback registration is no longer supported.
Ensure your Python development and deployment environments are running Python 3.11 or newer. Consider using virtual environments to manage Python versions effectively.
To resolve this, remove the Bluetooth adapter from your integration (e.g., in Home Assistant), reboot your system, and then add the Bluetooth device as a newly discovered integration.
No dependency data recorded yet.