From: rtrimana Date: Wed, 31 Jul 2019 22:47:58 +0000 (-0700) Subject: Adding 2 types of 'unlocked' events both for subscribers to 'lock' and 'unlock' events. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ff3512b7eb0a9ca4d42cc9f84dbce3aa20d79928;p=smartthings-infrastructure.git Adding 2 types of 'unlocked' events both for subscribers to 'lock' and 'unlock' events. --- diff --git a/Lock/Lock.groovy b/Lock/Lock.groovy index 285fe53..fd18e43 100644 --- a/Lock/Lock.groovy +++ b/Lock/Lock.groovy @@ -60,6 +60,8 @@ public class Lock { this.currentLock = "unlocked" sendEvent([name: "unlock", value: "unlocked", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) + sendEvent([name: "lock", value: "unlocked", deviceId: this.id, descriptionText: "", + displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -73,6 +75,8 @@ public class Lock { this.currentLock = "locked" sendEvent([name: "unlock", value: "unlocked", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) + sendEvent([name: "lock", value: "unlocked", deviceId: this.id, descriptionText: "", + displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } }