mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-19 06:13:06 +01:00
Merge pull request #1324 from james-smartthings/DVCSMP-2097-add-alterSetpoint-check
alterSetpoint - check for auto or off mode
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user