[ST Edge] How to create child devices with edge?

The concept of “child devices” no longer exists on Edge. For devices that have multiple components like LED strips, you can do the following:

  1. Create a device profile with multiple components and map them with the corresponding endpoints (if necessary) as described in this doc (Zigbee)
    • In this option, only the main component is exposed to some third-party integrations like Alexa.
  2. Create separate devices in the same driver using try_create_device (Only for LAN drivers). Despite all being created with the same driver, they won’t be related as parent/child.
    • Here you can use persistent storage to keep control of the devices created
    • Also, be careful of creating several devices at once, you might have to avoid the device’s thread using cosock.spawn (please, take a look at this post)
1 Like