- if (switchState != "off") {
- def task = timers.runAfter(metaData["delay"]) {
- switchLatestValue = "off"
- switchState = "off"
- currentSwitch = "off"
- relaySwitches[0].off()
- }
- }
- }
-
- //By Model Checker
- def setValue(LinkedHashMap eventDataMap) {
- if (eventDataMap["value"] != relaySwitches[0].switchState) {
- this.switchState = eventDataMap["value"]
- this.switchLatestValue = eventDataMap["value"]
- relaySwitches[0].setValue(eventDataMap["value"])
- sendEvent(eventDataMap)
- }
- }
-
-
- def currentValue(String deviceFeature) {
- relaySwitches[0].currentValue(deviceFeature)
- }
-
- def latestValue(String deviceFeature) {
- relaySwitches[0].latestValue(deviceFeature)