@cjcharles
Could we wrap this inside a test that determines whether or not child devices have been created. For example set a state value on createChild and remove it on deleteChild?
Or maybe I should just convert the log.debug to my logging structure so they can be turned off as it's going to be a very common error.
Open to your thoughts on this.
//Now find and update the child
def childName = device.deviceNetworkId+"-ep"+ep
def curdevice = null
try
{
// Got a zone status so first try to find the correct child device
curdevice = getChildDevices()?.find { it.deviceNetworkId == childName }
}
catch (e)
{
log.debug "Failed to find child " + childName + " - exception ${e}"
}
if (curdevice == null)
{
log.debug "Failed to find child called " + childName + " - exception ${e}"
}
else
{
curdevice?.sendEvent(name: "switch", value: status)
}