Child device not being created

If you want to try to fix this yourself, you're going to probably need to change the following section of code in every place you find it in the Parent Driver code.

    try {
        addChildDevice("Switch Level Child Device", "${device.deviceNetworkId}-ep9",
                [completedSetup: true, label: "${device.displayName} (Default Z-Wave Level)",
                isComponent: true, componentName: "ep9", componentLabel: "Default Z-Wave Level"])
    } catch (e) {
        runIn(3, "sendAlert", [data: [message: "Child device creation failed. Make sure the device handler for \"Switch Level Child Device\" is installed"]])
    }

and

    try {
        addChildDevice("Switch Level Child Device", "${device.deviceNetworkId}-ep9",
                [completedSetup: true, label: "${device.displayName} (Default Z-Wave Level)",
                isComponent: true, componentName: "ep9", componentLabel: "Default Z-Wave Level"])
    } catch (e) {
        runIn(3, "sendAlert", [data: [message: "Child device creation failed. Make sure the device handler for \"Switch Level Child Device\" is installed"]])
    }

and

    try {
        addChildDevice("Switch Level Child Device", "${device.deviceNetworkId}-ep101",
                [completedSetup: true, label: "${device.displayName} (Disable Local Control)",
                isComponent: true, componentName: "ep101", componentLabel: "Disable Local Control"])
    } catch (e) {
        runIn(3, "sendAlert", [data: [message: "Child device creation failed. Make sure the device handler for \"Switch Level Child Device\" is installed"]])
    }

These will all need to be changed to match Hubitat's Composite Device Driver add ChildDevice() command which is documented here:

As you can see, Hubitat requires FEWER arguments to be passed in the parameters section.

1 Like