Hey, I ran into this problem as well once I did the transition to the new App (Among the other super annoying things that it did). I managed to get at least one of my NZW37s to work by:
- Updating the version I was using from the 2017 version to the 2018 version
- Recreating the child Devices by editing the device handler (this made four child devices total)
- Deleting the old child devices
- Hacking together the old Child Device handler for the 2-Channel switch with the newer Fan Switch published by @Eric_Inovelli.
- Assigning my modified child device handler to the newly recreated childrn of the NZW37
My hack is as follows:
metadata {
definition (name: “Switch Child Device-Modified”, namespace: “inovelliUSA”, author: “Tom O’Brien”, vid: “generic-switch”) {
capability “Switch”
capability “Actuator”
capability “Sensor”
capability “Refresh”
}
tiles {
multiAttributeTile(name:"switch", type: "lighting", width: 3, height: 4, canChangeIcon: true){
tileAttribute ("device.switch", key: "PRIMARY_CONTROL") {
attributeState "off", label: '${name}', action: "switch.on", icon: "st.switches.switch.off", backgroundColor: "#ffffff", nextState:"turningOn"
attributeState "on", label: '${name}', action: "switch.off", icon: "st.switches.switch.on", backgroundColor: "#00A0DC", nextState:"turningOff"
attributeState "turningOn", label:'${name}', action:"switch.off", icon:"st.switches.switch.on", backgroundColor:"#00A0DC", nextState:"turningOff"
attributeState "turningOff", label:'${name}', action:"switch.on", icon:"st.switches.switch.off", backgroundColor:"#ffffff", nextState:"turningOn"
}
}
valueTile("level", "device.level", inactiveLabel: false, decoration: "flat", width: 2, height: 2) {
state "level", label:'${currentValue} %', unit:"%", backgroundColor:"#ffffff"
}
standardTile("refresh", "device.switch", width: 2, height: 2, inactiveLabel: false, decoration: "flat") {
state "default", label:'', action:"refresh.refresh", icon:"st.secondary.refresh"
}
}
}
def parse(Map description) {
def eventMap
if (description.type == null) eventMap = [name:"$description.name", value:"$description.value"]
else eventMap = [name:"$description.name", value:"$description.value", type:"$description.type"]
createEvent(eventMap)
}
def parse(description){
log.debug description
//if (description.name && description.value)sendEvent(name: description.name, value: description.value)
}
def on() {
sendEvent(name:“switch”, value:“on”)
if (!parent.installedSmartApp) parent.childOn(device.deviceNetworkId)
}
def off() {
sendEvent(name:“switch”, value:“off”)
if (!parent.installedSmartApp) parent.childOff(device.deviceNetworkId)
}
def refresh() {
if (!parent.installedSmartApp) parent.childRefresh(device.deviceNetworkId)
}