mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +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
e77a1b12f7
commit
1244fc4682
@ -426,7 +426,7 @@ def create_devices(
|
|||||||
kwargs[ATTR_CONNECTIONS] = {
|
kwargs[ATTR_CONNECTIONS] = {
|
||||||
(dr.CONNECTION_NETWORK_MAC, device.device.hub.mac_address)
|
(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)
|
kwargs[ATTR_VIA_DEVICE] = (DOMAIN, device.device.parent_device_id)
|
||||||
if (ocf := device.device.ocf) is not None:
|
if (ocf := device.device.ocf) is not None:
|
||||||
kwargs.update(
|
kwargs.update(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user