mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-05-15 22:07:21 +01:00
@@ -50,7 +50,7 @@ preferences {
|
|||||||
}
|
}
|
||||||
section("Send Notifications?") {
|
section("Send Notifications?") {
|
||||||
input("recipients", "contact", title: "Send notifications to") {
|
input("recipients", "contact", title: "Send notifications to") {
|
||||||
input "phone", "phone", title: "Send an SMS to this number?"
|
input "phone", "phone", title: "Send an SMS to this number?", required:false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,9 +266,11 @@ def sendAway(msg) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendPush(msg)
|
sendPush(msg)
|
||||||
|
if(phone){
|
||||||
sendSms(phone, msg)
|
sendSms(phone, msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.debug(msg)
|
log.debug(msg)
|
||||||
}
|
}
|
||||||
@@ -280,9 +282,11 @@ def sendHome(msg) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendPush(msg)
|
sendPush(msg)
|
||||||
|
if(phone){
|
||||||
sendSms(phone, msg)
|
sendSms(phone, msg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
log.debug(msg)
|
log.debug(msg)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user