alterSetpoint - check for auto or off mode

changed debug message
This commit is contained in:
James Chen
2016-10-06 15:44:16 -07:00
parent 427fa88ed8
commit 12b09acfa8
@@ -655,6 +655,10 @@ void lowerSetpoint() {
void alterSetpoint(temp) {
def mode = device.currentValue("thermostatMode")
if (mode == "off" || mode == "auto") {
log.warn "this mode: $mode does not allow alterSetpoint"
} else {
def heatingSetpoint = device.currentValue("heatingSetpoint")
def coolingSetpoint = device.currentValue("coolingSetpoint")
def deviceId = device.deviceNetworkId.split(/\./).last()
@@ -704,6 +708,7 @@ void alterSetpoint(temp) {
}
}
generateStatusEvent()
}
}
def generateStatusEvent() {