跳转到主要内容

Home Assistant蓝牙模型和助手

项目描述

Home Assistant蓝牙

CI Status Test coverage percentage

Poetry black pre-commit

PyPI Version Supported Python versions License

Home Assistant蓝牙模型和助手

用法

这个库用于访问Home Assistant蓝牙模型。库使用这些模型来接收和解析蓝牙广告数据。

@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

填充BluetoothServiceInfo所使用的数据来自 bleakBLEDeviceAdvertisementData,除了 source 字段,它来自Home Assistant,代表数据的来源。

未来,Home Assistant可能支持远程蓝牙收发器,这可能会使用源字段来确定哪个设备最近。

安装

通过pip(或您喜欢的包管理器)安装此软件

pip安装home-assistant-bluetooth

贡献者 ✨

感谢这些可爱的人们 (emoji key)

此项目遵循 all-contributors 规范。欢迎任何类型的贡献!

致谢

此软件包是用 Cookiecutterbrowniebroke/cookiecutter-pypackage 项目模板创建的。

项目详情


下载文件

下载适用于您的平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

home_assistant_bluetooth-1.12.2.tar.gz (7.8 kB 查看哈希)

上传时间

构建分布

home_assistant_bluetooth-1.12.2-py3-none-any.whl (7.9 kB 查看哈希)

上传时间 Python 3

由以下支持

AWSAWS云计算和安全赞助商DatadogDatadog监控FastlyFastlyCDNGoogleGoogle下载分析MicrosoftMicrosoftPSF赞助商PingdomPingdom监控SentrySentry错误日志StatusPageStatusPage状态页面