Compare commits

..

1 Commits

Author SHA1 Message Date
Jose Nunes
f1a633cf30 MSA-1515: Schalge dour lock 2016-10-07 11:32:28 -05:00
4 changed files with 2971 additions and 55 deletions

View File

@@ -655,10 +655,6 @@ 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()
@@ -708,7 +704,6 @@ void alterSetpoint(temp) {
} }
} }
generateStatusEvent() generateStatusEvent()
}
} }
def generateStatusEvent() { def generateStatusEvent() {

File diff suppressed because it is too large Load Diff

View File

@@ -12,13 +12,13 @@
* *
* It's Too Hot * It's Too Hot
* *
* Author: SmartThings - zahir * Author: SmartThings
*/ */
definition( definition(
name: "It's Too Hot", name: "It's Too Hot",
namespace: "smartthings", namespace: "smartthings",
author: "SmartThings", author: "SmartThings",
description: "Monitor the temperature and when it rises above your setting get a notification and/or turn off underfloor heating.", description: "Monitor the temperature and when it rises above your setting get a notification and/or turn on an A/C unit or fan.",
category: "Convenience", category: "Convenience",
iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/its-too-hot.png", iconUrl: "https://s3.amazonaws.com/smartapp-icons/Meta/its-too-hot.png",
iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/its-too-hot@2x.png" iconX2Url: "https://s3.amazonaws.com/smartapp-icons/Meta/its-too-hot@2x.png"
@@ -37,7 +37,7 @@ preferences {
input "phone1", "phone", title: "Send a Text Message?", required: false input "phone1", "phone", title: "Send a Text Message?", required: false
} }
} }
section("Turn off which A/C or fan...") { section("Turn on which A/C or fan...") {
input "switch1", "capability.switch", required: false input "switch1", "capability.switch", required: false
} }
} }
@@ -73,9 +73,9 @@ def temperatureHandler(evt) {
// TODO: Send "Temperature back to normal" SMS, turn switch off // TODO: Send "Temperature back to normal" SMS, turn switch off
} else { } else {
log.debug "Temperature rose above $tooHot: sending SMS and activating $mySwitch" log.debug "Temperature rose above $tooHot: sending SMS and activating $mySwitch"
def tempScale = location.temperatureScale ?: "C" def tempScale = location.temperatureScale ?: "F"
send("${temperatureSensor1.displayName} is too hot, reporting a temperature of ${evt.value}${evt.unit?:tempScale}") send("${temperatureSensor1.displayName} is too hot, reporting a temperature of ${evt.value}${evt.unit?:tempScale}")
switch1?.off() switch1?.on()
} }
} }
} }