Skip to content

Commit

Permalink
Merge pull request SmartThingsCommunity#192 from tslagle13/master
Browse files Browse the repository at this point in the history
Fix requirement for SMS
  • Loading branch information
kris-schaller committed Oct 20, 2015
2 parents 9c9fba0 + ecb9755 commit 1965f10
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions smartapps/tslagle13/routine-director.src/routine-director.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ preferences {
}
section("Send Notifications?") {
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
}
}

Expand Down Expand Up @@ -266,7 +266,9 @@ def sendAway(msg) {
}
else {
sendPush(msg)
sendSms(phone, msg)
if(phone){
sendSms(phone, msg)
}
}
}

Expand All @@ -280,7 +282,9 @@ def sendHome(msg) {
}
else {
sendPush(msg)
sendSms(phone, msg)
if(phone){
sendSms(phone, msg)
}
}
}

Expand Down Expand Up @@ -339,4 +343,4 @@ private getTimeIntervalLabel() {

private hideOptionsSection() {
(starting || ending || days || modes) ? false: true
}
}

0 comments on commit 1965f10

Please sign in to comment.