mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-10 22:05:07 +01:00
alterSetpoint - check for auto or off mode
changed debug message
This commit is contained in:
@@ -655,6 +655,10 @@ void lowerSetpoint() {
|
|||||||
void alterSetpoint(temp) {
|
void alterSetpoint(temp) {
|
||||||
|
|
||||||
def mode = device.currentValue("thermostatMode")
|
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 heatingSetpoint = device.currentValue("heatingSetpoint")
|
||||||
def coolingSetpoint = device.currentValue("coolingSetpoint")
|
def coolingSetpoint = device.currentValue("coolingSetpoint")
|
||||||
def deviceId = device.deviceNetworkId.split(/\./).last()
|
def deviceId = device.deviceNetworkId.split(/\./).last()
|
||||||
@@ -704,6 +708,7 @@ void alterSetpoint(temp) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
generateStatusEvent()
|
generateStatusEvent()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
def generateStatusEvent() {
|
def generateStatusEvent() {
|
||||||
|
|||||||
Reference in New Issue
Block a user