From b55f1df297370d03c70f032b44660bef0a4e4540 Mon Sep 17 00:00:00 2001 From: Joost Lekkerkerker Date: Sat, 29 Mar 2025 10:18:27 +0100 Subject: [PATCH] Only link the parent device if known in SmartThings (#141719) Only link the parent device if we know the parent device --- homeassistant/components/smartthings/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/smartthings/__init__.py b/homeassistant/components/smartthings/__init__.py index 4f7b8c2ddb9..346d5e66b42 100644 --- a/homeassistant/components/smartthings/__init__.py +++ b/homeassistant/components/smartthings/__init__.py @@ -426,7 +426,7 @@ def create_devices( kwargs[ATTR_CONNECTIONS] = { (dr.CONNECTION_NETWORK_MAC, device.device.hub.mac_address) } - if device.device.parent_device_id: + if device.device.parent_device_id and device.device.parent_device_id in devices: kwargs[ATTR_VIA_DEVICE] = (DOMAIN, device.device.parent_device_id) if (ocf := device.device.ocf) is not None: kwargs.update(