Changes in classes: new concept for latest value + all types of events generated...
[smartthings-infrastructure.git] / Methods / sendNotificationToContacts.groovy
1 /////////////////////////////////////////////////////////////////////
2 ////sendNotificationToContacts(text, recipients)
3 def sendNotificationToContacts(String text, String recipients) {
4         for (int i = 0;i < recipients.size();i++) {
5                 for (int j = 0;j < location.contacts.size();j++) {
6                         if (recipients[i] == location.contacts[j]) {
7                                 println("Sending \""+text+"\" to "+location.phoneNumbers[j].toString())
8                         }
9                 }
10         }
11 }
12
13 def sendNotificationToContacts(String text, String recipients, LinkedHashMap metaData) {
14         for (int i = 0;i < recipients.size();i++) {
15                 for (int j = 0;j < location.contacts.size();j++) {
16                         if (recipients[i] == location.contacts[j]) {
17                                 println("Sending \""+text+"\" to "+location.phoneNumbers[j].toString())
18                         }
19                 }
20         }
21 }