From ff3512b7eb0a9ca4d42cc9f84dbce3aa20d79928 Mon Sep 17 00:00:00 2001 From: rtrimana Date: Wed, 31 Jul 2019 15:47:58 -0700 Subject: [PATCH] Adding 2 types of 'unlocked' events both for subscribers to 'lock' and 'unlock' events. --- Lock/Lock.groovy | 4 ++++ 1 file changed, 4 insertions(+) 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"}']) } } } -- 2.34.1