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

Uploaded Source

Built Distribution

home_assistant_bluetooth-2.0.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for home_assistant_bluetooth-2.0.0.tar.gz
Algorithm Hash digest
SHA256 3febd16b194812b156024d9bc8ce8ec7622cdd8d159047cac504cc77ca034ea1
MD5 09a23d89ff043788ed45857b9b5a49e9
BLAKE2b-256 bc6f914fd8086f502748907751766e26e3f7fe5204347a679703ee9954e55e4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for home_assistant_bluetooth-2.0.0.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-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for home_assistant_bluetooth-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d7c2ac48c303adacad73cb6cdfe7710f2fccd2a367d4c3106acf301b0d22b91
MD5 995d264f1afb7d03fd2d6696ef43252e
BLAKE2b-256 153e2ed9e59da8fc26c43cbd9d6abbd27217138a31c608b1d334cc5e680e4069

See more details on using hashes here.

Provenance

The following attestation bundles were made for home_assistant_bluetooth-2.0.0-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