From: amiraj Date: Mon, 5 Aug 2019 19:55:43 +0000 (-0700) Subject: Removing not required events in device handlers. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=commitdiff_plain;h=e7a2ccbefad0e44d666b12a8071b6bb8886fec18;hp=c63f0f08fcbfc5d1f1f382a280577d5dd8cd0c0d Removing not required events in device handlers. --- diff --git a/AccelerationSensor/AccelerationSensor.groovy b/AccelerationSensor/AccelerationSensor.groovy index fcc1688..905e018 100644 --- a/AccelerationSensor/AccelerationSensor.groovy +++ b/AccelerationSensor/AccelerationSensor.groovy @@ -31,12 +31,8 @@ public class AccelerationSensor { def statesSince() { def evtActive = [[name: "acceleration", value: "active", deviceId: "accelerationSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "acceleration.active", value: "active", deviceId: "accelerationSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] def evtInactive = [[name: "acceleration", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "acceleration.inactive", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] def init = Verify.getInt(0,4) def evtToSend = [] @@ -73,12 +69,8 @@ public class AccelerationSensor { def eventsSince() { def evtActive = [[name: "acceleration", value: "active", deviceId: "accelerationSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "acceleration.active", value: "active", deviceId: "accelerationSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] def evtInactive = [[name: "acceleration", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "acceleration.inactive", value: "inactive", deviceId: "accelerationSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] def init = Verify.getInt(0,4) def evtToSend = [] diff --git a/Alarm/Alarm.groovy b/Alarm/Alarm.groovy index 446face..6a0a24f 100644 --- a/Alarm/Alarm.groovy +++ b/Alarm/Alarm.groovy @@ -42,8 +42,6 @@ public class Alarm { this.currentAlarm = "both" sendEvent([name: "alarm", value: "both", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "alarm.both", value: "both", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -59,8 +57,6 @@ public class Alarm { this.currentAlarm = "off" sendEvent([name: "alarm", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "alarm.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -72,8 +68,6 @@ public class Alarm { this.currentAlarm = "siren" sendEvent([name: "alarm", value: "siren", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "alarm.siren", value: "siren", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -85,8 +79,6 @@ public class Alarm { this.currentAlarm = "strobe" sendEvent([name: "alarm", value: "strobe", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "alarm.strobe", value: "strobe", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } diff --git a/ColorControl/ColorControl.groovy b/ColorControl/ColorControl.groovy index a65afbb..0e9ced0 100644 --- a/ColorControl/ColorControl.groovy +++ b/ColorControl/ColorControl.groovy @@ -156,8 +156,6 @@ public class ColorControl { println("The light is changed to on!") sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -167,8 +165,6 @@ public class ColorControl { println("The light is changed to off!") sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } diff --git a/ColorTemperature/ColorTemperature.groovy b/ColorTemperature/ColorTemperature.groovy index 4956e04..250ac12 100644 --- a/ColorTemperature/ColorTemperature.groovy +++ b/ColorTemperature/ColorTemperature.groovy @@ -75,8 +75,6 @@ public class ColorTemperature { println("The light is changed to $currentSwitch!") sendEvent([name: "switch", value: "$currentSwitch", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "$currentSwitch", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -86,8 +84,6 @@ public class ColorTemperature { println("The light is changed to $currentSwitch!") sendEvent([name: "switch", value: "$currentSwitch", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "$currentSwitch", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } diff --git a/ContactSensor/ContactSensor.groovy b/ContactSensor/ContactSensor.groovy index 4a10a57..281e793 100644 --- a/ContactSensor/ContactSensor.groovy +++ b/ContactSensor/ContactSensor.groovy @@ -28,17 +28,9 @@ public class ContactSensor { } def eventsSince() { - def evtOpen = [[name: "contact.open", value: "open", deviceId: "contactSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "contact", value: "open", deviceId: "contactSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "tamper.tampered", value: "open", deviceId: "contactSensorID0", descriptionText: "", + def evtOpen = [[name: "contact", value: "open", deviceId: "contactSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] - def evtClosed = [[name: "contact.closed", value: "closed", deviceId: "contactSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "contact", value: "closed", deviceId: "contactSensorID0", descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'], - [name: "tamper.tampered", value: "closed", deviceId: "contactSensorID0", descriptionText: "", + def evtClosed = [[name: "contact", value: "closed", deviceId: "contactSensorID0", descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']] def init = Verify.getInt(0,4) def evtToSend = [] diff --git a/DoorControl/DoorControl.groovy b/DoorControl/DoorControl.groovy index d0b04d2..c825879 100644 --- a/DoorControl/DoorControl.groovy +++ b/DoorControl/DoorControl.groovy @@ -30,8 +30,6 @@ public class DoorControl { this.doorState = "open" sendEvent([name: "doorControl", value: "open", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "doorControl.open", value: "open", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -43,8 +41,6 @@ public class DoorControl { this.doorState = "open" sendEvent([name: "doorControl", value: "open", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "doorControl.open", value: "open", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -56,8 +52,6 @@ public class DoorControl { this.doorState = "closed" sendEvent([name: "doorControl", value: "closed", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "doorControl.closed", value: "closed", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -69,8 +63,6 @@ public class DoorControl { this.doorState = "closed" sendEvent([name: "doorControl", value: "closed", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "doorControl.closed", value: "closed", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } diff --git a/Lock/Lock.groovy b/Lock/Lock.groovy index 0271050..1b2e472 100644 --- a/Lock/Lock.groovy +++ b/Lock/Lock.groovy @@ -33,8 +33,6 @@ public class Lock { this.currentLock = "locked" sendEvent([name: "lock", value: "locked", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "lock.locked", value: "locked", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -47,8 +45,6 @@ public class Lock { this.currentLock = "locked" sendEvent([name: "lock", value: "locked", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "lock.locked", value: "locked", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -59,12 +55,8 @@ public class Lock { this.lockLatestValue = "unlocked" this.lockState = "unlocked" 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"}']) - sendEvent([name: "lock.unlocked", value: "unlocked", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -75,11 +67,7 @@ public class Lock { this.lockLatestValue = "unlocked" this.lockState = "unlocked" 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"}']) - sendEvent([name: "lock.unlocked", value: "unlocked", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } diff --git a/MusicPlayer/MusicPlayer.groovy b/MusicPlayer/MusicPlayer.groovy index 8d1a95d..659476a 100644 --- a/MusicPlayer/MusicPlayer.groovy +++ b/MusicPlayer/MusicPlayer.groovy @@ -55,8 +55,6 @@ public class MusicPlayer { this.mute = "muted" sendEvent([name: "mute", value: "muted", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "mute.muted", value: "muted", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } def nextTrack() { @@ -67,8 +65,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } sendEvent([name: "trackDescription", value: "someDescriptions", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) @@ -81,8 +77,6 @@ public class MusicPlayer { this.status = "paused" sendEvent([name: "status", value: "paused", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.paused", value: "paused", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } def play() { @@ -91,8 +85,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } def playTrack(String trackToPlay) { @@ -102,8 +94,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } sendEvent([name: "trackDescription", value: "someDescriptions", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) @@ -119,8 +109,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } sendEvent([name: "trackDescription", value: "someDescriptions", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) @@ -137,8 +125,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } def setLevel(int level) { @@ -156,8 +142,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } sendEvent([name: "trackDescription", value: "someDescriptions", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) @@ -170,8 +154,6 @@ public class MusicPlayer { this.status = "stopped" sendEvent([name: "status", value: "stopped", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.stopped", value: "stopped", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } def playText(String text) { @@ -180,8 +162,6 @@ public class MusicPlayer { this.status = "playing" sendEvent([name: "status", value: "playing", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "status.playing", value: "playing", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } diff --git a/RelaySwitch/RelaySwitch.groovy b/RelaySwitch/RelaySwitch.groovy index 137d7ad..7239f9d 100644 --- a/RelaySwitch/RelaySwitch.groovy +++ b/RelaySwitch/RelaySwitch.groovy @@ -33,8 +33,6 @@ public class RelaySwitch { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -47,8 +45,6 @@ public class RelaySwitch { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -61,8 +57,6 @@ public class RelaySwitch { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -75,8 +69,6 @@ public class RelaySwitch { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } diff --git a/Switch/Switch.groovy b/Switch/Switch.groovy index aa3b2c5..8bea530 100644 --- a/Switch/Switch.groovy +++ b/Switch/Switch.groovy @@ -44,8 +44,6 @@ public class Switch { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -58,8 +56,6 @@ public class Switch { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -72,8 +68,6 @@ public class Switch { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -86,8 +80,6 @@ public class Switch { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } diff --git a/SwitchLevel/SwitchLevel.groovy b/SwitchLevel/SwitchLevel.groovy index ccd8e96..f9337f9 100644 --- a/SwitchLevel/SwitchLevel.groovy +++ b/SwitchLevel/SwitchLevel.groovy @@ -57,8 +57,6 @@ public class SwitchLevel { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -71,8 +69,6 @@ public class SwitchLevel { this.currentSwitch = "on" sendEvent([name: "switch", value: "on", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.on", value: "on", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -85,8 +81,6 @@ public class SwitchLevel { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -99,8 +93,6 @@ public class SwitchLevel { this.currentSwitch = "off" sendEvent([name: "switch", value: "off", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "switch.off", value: "off", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } diff --git a/Valve/Valve.groovy b/Valve/Valve.groovy index 75efd8a..7680e16 100644 --- a/Valve/Valve.groovy +++ b/Valve/Valve.groovy @@ -30,8 +30,6 @@ public class Valve { this.valve = "open" sendEvent([name: "contact", value: "open", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "contact.open", value: "open", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -43,8 +41,6 @@ public class Valve { this.valve = "open" sendEvent([name: "contact", value: "open", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "contact.open", value: "open", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } } @@ -56,8 +52,6 @@ public class Valve { this.valve = "closed" sendEvent([name: "contact", value: "closed", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "contact.closed", value: "closed", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } @@ -69,8 +63,6 @@ public class Valve { this.valve = "closed" sendEvent([name: "contact", value: "closed", deviceId: this.id, descriptionText: "", displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) - sendEvent([name: "contact.closed", value: "closed", deviceId: this.id, descriptionText: "", - displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}']) } } }