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.13.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for home_assistant_bluetooth-1.13.1.tar.gz
Algorithm Hash digest
SHA256 0ae0e2a8491cc762ee9e694b8bc7665f1e2b4618926f63969a23a2e3a48ce55e
MD5 40f112bd8ca6f927fe81512af108e5bb
BLAKE2b-256 b40ec05ee603cab1adb847a305bc8f1034cbdbc0a5d15169fcf68c0d6d21e33f

See more details on using hashes here.

Provenance

The following attestation bundles were made for home_assistant_bluetooth-1.13.1.tar.gz:

Publisher: ci.yml on home-assistant-libs/home-assistant-bluetooth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for home_assistant_bluetooth-1.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cdf13b5b45f7744165677831e309ee78fbaf0c2866c6b5931e14d1e4e7dae5d7
MD5 2be1328bb4dc48c673f98409a4b93488
BLAKE2b-256 859b9904cec885cc32c45e8c22cd7e19d9c342e30074fdb7c58f3d5b33ea1adb

See more details on using hashes here.

Provenance

The following attestation bundles were made for home_assistant_bluetooth-1.13.1-py3-none-any.whl:

Publisher: ci.yml on home-assistant-libs/home-assistant-bluetooth

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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