I’m just starting to write device handler for a device and spent days trying figure out why the action never get trigger when I pressed on “raiseSetpoint” and “lowerSetpoint”. I expect to see the print out on debug windows, but nothing happen. Can anyone tell me what’s wrong? TIA!
tiles(scale: 2) {
// Multi Tile:
//multiAttributeTile(name:"DeviceTrigger", type: "generic", width: 6, height: 6, canChangeIcon: true) {
multiAttributeTile(name:"DeviceTrigger", type: "generic", width: 6, height: 6, canChangeIcon: false) {
tileAttribute ("device.door", key: "PRIMARY_CONTROL", icon: "st.Transportation.transportation14", , backgroundColor:"#33CCFF") {
attributeState "closeDoor", label:'CLOSE' , action: "open", icon: "https://download.senclo.com/tile_2x2_garage_close_icon.png", backgroundColor:"#55A0FF", labelColor: "000000", nextState: "doorOpening"
attributeState "openDoor", label: 'OPEN', action: "close", icon: "https://download.senclo.com/tile_2x2_garage_open_icon.png", backgroundColor: "#FF5050", nextState: "doorClosing"
attributeState "doorOpening", label: 'OPENING', action: "", icon: "https://download.senclo.com/tile_2x2_garage_halfway_icon.png", backgroundColor: "#FFAA33"
attributeState "doorClosing", label: 'CLOSING', action: "", icon: "https://download.senclo.com/tile_2x2_garage_halfway_icon.png", backgroundColor: "#79B821"
}
tileAttribute("temperature", key: "SECONDARY_CONTROL") {
//attributeState "temperature", label:'Temperature: ${tempValue}°C'
attributeState "temperature", label:'Temperature: 70°C'
}
}
standardTile("raiseSetpoint", "device.thermostatSetpoint", width: 3, height: 1, decoration: "flat") {
state "setpoint", action:"upDS", icon:"st.thermostat.thermostat-left"
}
standardTile("lowerSetpoint", "device.thermostatSetpoint", width: 3, height: 1, decoration: "flat") {
state "setpoint", action:"downDS", icon:"st.thermostat.thermostat-right"
}
main (["DeviceTrigger", "temperature"])
details(["DeviceTrigger", "raiseSetpoint", "lowerSetpoint"])
}
} //end of metadata
def doorSelected = 0
void upDS() {
log.info "======================= upDS CALLED =========================="
log.info “======================= upDS CALLED ==========================”
}
void downDS() {
log.info "======================= downDS CALLED =========================="
log.info “======================= downDS CALLED ==========================”
}