hass-core/homeassistant/components/oralb/device.py
Aarni Koskela 3d29638804
Deduplicate sensor_device_info_to_device_info (#81905)
Co-authored-by: J. Nick Koston <nick@koston.org>
2022-11-14 12:12:53 -06:00

15 lines
434 B
Python

"""Support for OralB devices."""
from __future__ import annotations
from oralb_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)