Skip to main content

Home Assistant Bluetooth Models and Helpers

Project description

Home Assistant Bluetooth

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

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.

@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'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):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Cookiecutter and the browniebroke/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

home_assistant_bluetooth-1.12.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file home_assistant_bluetooth-1.12.2.tar.gz.

File metadata

File hashes

Hashes for home_assistant_bluetooth-1.12.2.tar.gz
Algorithm Hash digest
SHA256 40d6c26a409c6a490f4ebc6d6b816e70743e6e0cad81942649998a8b281e5532
MD5 a83c1a7871c6d93e4ba650cecf7c2fdc
BLAKE2b-256 c2180a8fcf4a8c52ed0ffd9cade5616d2bc336a72b53d8914d4e93527b3b4bf2

See more details on using hashes here.

File details

Details for the file home_assistant_bluetooth-1.12.2-py3-none-any.whl.

File metadata

File hashes

Hashes for home_assistant_bluetooth-1.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ded84c2f621255d2ed3bfa9a1ad824e2aadfbbd43c093da700fdc294f0c39202
MD5 ed69876a5a019ea9cee6ee52a0dd4081
BLAKE2b-256 a4b0c5dd30073261268acfd20853481a3ea848f2180d2864c346bf5a382f4f8e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page