mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 05:37:44 +00:00
Sort SmartThings devices to be created by parent device id (#141515)
This commit is contained in:
parent
eb901bcf3a
commit
46ee3d2b26
@ -410,7 +410,9 @@ def create_devices(
|
||||
rooms: dict[str, str],
|
||||
) -> None:
|
||||
"""Create devices in the device registry."""
|
||||
for device in devices.values():
|
||||
for device in sorted(
|
||||
devices.values(), key=lambda d: d.device.parent_device_id or ""
|
||||
):
|
||||
kwargs: dict[str, Any] = {}
|
||||
if device.device.hub is not None:
|
||||
kwargs = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user