mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-07 21:21:56 +00:00
DVCSMP-1959 fixed issue with logging personal information and unused subscription from SmartApps
This commit is contained in:
@@ -78,7 +78,7 @@ def humidityHandler(evt) {
|
||||
log.debug "Notification already sent within the last ${deltaMinutes} minutes"
|
||||
|
||||
} else {
|
||||
log.debug "Humidity Rose Above ${tooHumid}: sending SMS to $phone1 and activating ${mySwitch}"
|
||||
log.debug "Humidity Rose Above ${tooHumid}: sending SMS and activating ${mySwitch}"
|
||||
send("${humiditySensor1.label} sensed high humidity level of ${evt.value}")
|
||||
switch1?.on()
|
||||
}
|
||||
@@ -91,7 +91,7 @@ def humidityHandler(evt) {
|
||||
log.debug "Notification already sent within the last ${deltaMinutes} minutes"
|
||||
|
||||
} else {
|
||||
log.debug "Humidity Fell Below ${notHumidEnough}: sending SMS to $phone1 and activating ${mySwitch}"
|
||||
log.debug "Humidity Fell Below ${notHumidEnough}: sending SMS and activating ${mySwitch}"
|
||||
send("${humiditySensor1.label} sensed high humidity level of ${evt.value}")
|
||||
switch1?.off()
|
||||
}
|
||||
|
||||
@@ -25,14 +25,10 @@ preferences {
|
||||
|
||||
def installed() {
|
||||
subscribe(contact1, "contact", contactHandler)
|
||||
subscribe(switch1, "switch.on", switchOnHandler)
|
||||
subscribe(switch1, "switch.off", switchOffHandler)
|
||||
}
|
||||
|
||||
def updated() {
|
||||
unsubscribe()
|
||||
subscribe(contact1, "contact", contactHandler)
|
||||
subscribe(switch1, "switch.on", switchOnHandler)
|
||||
subscribe(switch1, "switch.off", switchOffHandler)
|
||||
}
|
||||
|
||||
@@ -46,4 +42,4 @@ def contactHandler(evt) {
|
||||
if (evt.value == "closed") {
|
||||
if(state.wasOn)switch1.on()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ def humidityHandler(evt) {
|
||||
|
||||
} else {
|
||||
if (state.lastStatus != "off") {
|
||||
log.debug "Humidity Rose Above $humidityHigh1: sending SMS to $phone1 and deactivating $mySwitch"
|
||||
log.debug "Humidity Rose Above $humidityHigh1: sending SMS and deactivating $mySwitch"
|
||||
send("${humiditySensor1.label} sensed high humidity level of ${evt.value}, turning off ${switch1.label}")
|
||||
switch1?.off()
|
||||
state.lastStatus = "off"
|
||||
@@ -99,7 +99,7 @@ def humidityHandler(evt) {
|
||||
|
||||
} else {
|
||||
if (state.lastStatus != "on") {
|
||||
log.debug "Humidity Dropped Below $humidityLow1: sending SMS to $phone1 and activating $mySwitch"
|
||||
log.debug "Humidity Dropped Below $humidityLow1: sending SMS and activating $mySwitch"
|
||||
send("${humiditySensor1.label} sensed low humidity level of ${evt.value}, turning on ${switch1.label}")
|
||||
switch1?.on()
|
||||
state.lastStatus = "on"
|
||||
@@ -125,4 +125,4 @@ private send(msg) {
|
||||
}
|
||||
|
||||
log.debug msg
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ def temperatureHandler(evt) {
|
||||
def alreadySentSms = recentEvents.count { it.doubleValue <= tooCold } > 1
|
||||
|
||||
if (alreadySentSms) {
|
||||
log.debug "SMS already sent to $phone1 within the last $deltaMinutes minutes"
|
||||
log.debug "SMS already sent within the last $deltaMinutes minutes"
|
||||
// TODO: Send "Temperature back to normal" SMS, turn switch off
|
||||
} else {
|
||||
log.debug "Temperature dropped below $tooCold: sending SMS to $phone1 and activating $mySwitch"
|
||||
log.debug "Temperature dropped below $tooCold: sending SMS and activating $mySwitch"
|
||||
def tempScale = location.temperatureScale ?: "F"
|
||||
send("${temperatureSensor1.displayName} is too cold, reporting a temperature of ${evt.value}${evt.unit?:tempScale}")
|
||||
switch1?.on()
|
||||
|
||||
Reference in New Issue
Block a user