1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-21 11:30:03 +00:00
Files
core/homeassistant/components/bthome/device.py
2024-03-08 14:51:32 +01:00

17 lines
447 B
Python

"""Support for BTHome Bluetooth devices."""
from __future__ import annotations
from bthome_ble import DeviceKey
from homeassistant.components.bluetooth.passive_update_processor import (
PassiveBluetoothEntityKey,
)
def device_key_to_bluetooth_entity_key(
device_key: DeviceKey,
) -> PassiveBluetoothEntityKey:
"""Convert a device key to an entity key."""
return PassiveBluetoothEntityKey(device_key.key, device_key.device_id)