diff --git a/homeassistant/components/bthome/__init__.py b/homeassistant/components/bthome/__init__.py index 751c8f74bf9..566609b998b 100644 --- a/homeassistant/components/bthome/__init__.py +++ b/homeassistant/components/bthome/__init__.py @@ -14,7 +14,11 @@ from homeassistant.components.bluetooth import ( from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import HomeAssistant -from homeassistant.helpers.device_registry import DeviceRegistry, async_get +from homeassistant.helpers.device_registry import ( + CONNECTION_BLUETOOTH, + DeviceRegistry, + async_get, +) from .const import ( BTHOME_BLE_EVENT, @@ -55,6 +59,7 @@ def process_service_info( sensor_device_info = update.devices[device_key.device_id] device = device_registry.async_get_or_create( config_entry_id=entry.entry_id, + connections={(CONNECTION_BLUETOOTH, address)}, identifiers={(BLUETOOTH_DOMAIN, address)}, manufacturer=sensor_device_info.manufacturer, model=sensor_device_info.model, diff --git a/homeassistant/components/xiaomi_ble/__init__.py b/homeassistant/components/xiaomi_ble/__init__.py index b12f4df7db1..ced8c3cc471 100644 --- a/homeassistant/components/xiaomi_ble/__init__.py +++ b/homeassistant/components/xiaomi_ble/__init__.py @@ -15,7 +15,11 @@ from homeassistant.components.bluetooth import ( from homeassistant.config_entries import ConfigEntry from homeassistant.const import Platform from homeassistant.core import CoreState, HomeAssistant -from homeassistant.helpers.device_registry import DeviceRegistry, async_get +from homeassistant.helpers.device_registry import ( + CONNECTION_BLUETOOTH, + DeviceRegistry, + async_get, +) from .const import ( CONF_DISCOVERED_EVENT_CLASSES, @@ -55,6 +59,7 @@ def process_service_info( sensor_device_info = update.devices[device_key.device_id] device = device_registry.async_get_or_create( config_entry_id=entry.entry_id, + connections={(CONNECTION_BLUETOOTH, address)}, identifiers={(BLUETOOTH_DOMAIN, address)}, manufacturer=sensor_device_info.manufacturer, model=sensor_device_info.model,