mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-03-08 05:31:56 +00:00
CREX-5826 - Replace text (#1153)
This commit is contained in:
@@ -48,9 +48,9 @@ preferences {
|
||||
}
|
||||
section("Via a push notification and/or an SMS message"){
|
||||
input("recipients", "contact", title: "Send notifications to") {
|
||||
input "phone", "phone", title: "Phone Number (for SMS, optional)", required: false
|
||||
input "phone", "phone", title: "Enter a phone number to get SMS", required: false
|
||||
paragraph "If outside the US please make sure to enter the proper country code"
|
||||
input "pushAndPhone", "enum", title: "Both Push and SMS?", required: false, options: ["Yes", "No"]
|
||||
input "pushAndPhone", "enum", title: "Notify me via Push Notification", required: false, options: ["Yes", "No"]
|
||||
}
|
||||
}
|
||||
section("Minimum time between messages (optional, defaults to every message)") {
|
||||
@@ -111,19 +111,17 @@ private sendMessage(evt) {
|
||||
if (location.contactBookEnabled) {
|
||||
sendNotificationToContacts(msg, recipients, options)
|
||||
} else {
|
||||
if (!phone || pushAndPhone != 'No') {
|
||||
if (pushAndPhone != 'No') {
|
||||
log.debug 'sending push'
|
||||
options.method = 'push'
|
||||
//sendPush(msg)
|
||||
sendNotification(msg, options)
|
||||
}
|
||||
if (phone) {
|
||||
options.phone = phone
|
||||
log.debug 'sending SMS'
|
||||
//sendSms(phone, msg)
|
||||
}
|
||||
sendNotification(msg, options)
|
||||
}
|
||||
|
||||
}
|
||||
if (frequency) {
|
||||
state[evt.deviceId] = now()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user