diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index 2bacd476332..f3a95e57831 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -103,10 +103,16 @@ async def async_setup_entry(hass: HomeAssistant, entry: SmartThingsConfigEntry) for dev in device_status.values(): for component in dev.device.components: if component.id == MAIN and Capability.BRIDGE in component.capabilities: + assert dev.device.hub device_registry.async_get_or_create( config_entry_id=entry.entry_id, identifiers={(DOMAIN, dev.device.device_id)}, + connections={ + (dr.CONNECTION_NETWORK_MAC, dev.device.hub.mac_address) + }, name=dev.device.label, + sw_version=dev.device.hub.firmware_version, + model=dev.device.hub.hardware_type, ) scenes = { scene.scene_id: scene diff --git a/tests/components/smartthings/snapshots/test_init.ambr b/tests/components/smartthings/snapshots/test_init.ambr index 7f0e5c17cf2..18bc802e2bc 100644 --- a/tests/components/smartthings/snapshots/test_init.ambr +++ b/tests/components/smartthings/snapshots/test_init.ambr @@ -1029,6 +1029,10 @@ 'config_entries_subentries': , 'configuration_url': None, 'connections': set({ + tuple( + 'mac', + 'd0:52:a8:72:91:02', + ), }), 'disabled_by': None, 'entry_type': None, @@ -1044,14 +1048,14 @@ 'labels': set({ }), 'manufacturer': None, - 'model': None, + 'model': 'V2_HUB', 'model_id': None, 'name': 'Home Hub', 'name_by_user': None, 'primary_config_entry': , 'serial_number': None, 'suggested_area': None, - 'sw_version': None, + 'sw_version': '000.055.00005', 'via_device_id': None, }) # ---