Metadata-Version: 2.3 Name: home-assistant-bluetooth Version: 2.0.0 Summary: Home Assistant Bluetooth Models and Helpers License: Apache-2.0 Author: J. Nick Koston Author-email: nick@home-assistant.io Requires-Python: >=3.11 Classifier: Development Status :: 5 - Production/Stable Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Apache Software License Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.11 Classifier: Programming Language :: Python :: 3.12 Classifier: Programming Language :: Python :: 3.13 Classifier: Topic :: Software Development :: Libraries Requires-Dist: habluetooth (>=4.0) Project-URL: Bug Tracker, https://github.com/home-assistant-libs/home-assistant-bluetooth/issues Project-URL: Changelog, https://github.com/home-assistant-libs/home-assistant-bluetooth/blob/main/CHANGELOG.md Project-URL: Repository, https://github.com/home-assistant-libs/home-assistant-bluetooth Description-Content-Type: text/markdown # Home Assistant Bluetooth
Home Assistant Bluetooth Models and Helpers ## Usage This library is for accessing Home Assistant Bluetooth models. Libraries use these models to receive and parse Bluetooth advertisement data. ```python @dataclasses.dataclass class BluetoothServiceInfo(BaseServiceInfo): """Prepared info from bluetooth entries.""" name: str address: str rssi: int manufacturer_data: dict[int, bytes] service_data: dict[str, bytes] service_uuids: list[str] source: str ``` The data used to populate BluetoothServiceInfo comes from [bleak](https://github.com/hbldh/bleak)'s `BLEDevice` and `AdvertisementData`, except for the `source` field, which comes from Home Assistant and represents the source of the data. In the future, Home Assistant may support remote Bluetooth transceivers, which may use the source field to determine which device is closest. ## Installation Install this via pip (or your favourite package manager): `pip install home-assistant-bluetooth` ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## Credits This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [browniebroke/cookiecutter-pypackage](https://github.com/browniebroke/cookiecutter-pypackage) project template.