2023-01-25 17:28:13 +00:00
|
|
|
"""Support for Mopeka devices."""
|
2024-03-08 14:01:29 +00:00
|
|
|
|
2023-01-25 17:28:13 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
from mopeka_iot_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)
|