mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-17 14:23:07 +01:00
Change log statement to not log personal phone number (#1224)
This commit is contained in:
committed by
Juan Pablo Risso
parent
4ef2e694c2
commit
6aa09bb052
@@ -50,7 +50,7 @@ def updated() {
|
|||||||
|
|
||||||
def motionActiveHandler(evt) {
|
def motionActiveHandler(evt) {
|
||||||
log.trace "$evt.value: $evt, $settings"
|
log.trace "$evt.value: $evt, $settings"
|
||||||
|
|
||||||
if (presence1.latestValue("presence") == "not present") {
|
if (presence1.latestValue("presence") == "not present") {
|
||||||
// Don't send a continuous stream of text messages
|
// Don't send a continuous stream of text messages
|
||||||
def deltaSeconds = 10
|
def deltaSeconds = 10
|
||||||
@@ -60,14 +60,14 @@ def motionActiveHandler(evt) {
|
|||||||
def alreadySentSms = recentEvents.count { it.value && it.value == "active" } > 1
|
def alreadySentSms = recentEvents.count { it.value && it.value == "active" } > 1
|
||||||
|
|
||||||
if (alreadySentSms) {
|
if (alreadySentSms) {
|
||||||
log.debug "SMS already sent to $phone1 within the last $deltaSeconds seconds"
|
log.debug "SMS already sent within the last $deltaSeconds seconds"
|
||||||
} else {
|
} else {
|
||||||
if (location.contactBookEnabled) {
|
if (location.contactBookEnabled) {
|
||||||
log.debug "$motion1 has moved while you were out, sending notifications to: ${recipients?.size()}"
|
log.debug "$motion1 has moved while you were out, sending notifications to: ${recipients?.size()}"
|
||||||
sendNotificationToContacts("${motion1.label} ${motion1.name} moved while you were out", recipients)
|
sendNotificationToContacts("${motion1.label} ${motion1.name} moved while you were out", recipients)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
log.debug "$motion1 has moved while you were out, texting $phone1"
|
log.debug "$motion1 has moved while you were out, sending text"
|
||||||
sendSms(phone1, "${motion1.label} ${motion1.name} moved while you were out")
|
sendSms(phone1, "${motion1.label} ${motion1.name} moved while you were out")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user