mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Only link the parent device if known in SmartThings (#141719)
Only link the parent device if we know the parent device
This commit is contained in:
parent
d88f7b8600
commit
b55f1df297
@ -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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user