//By Model Checker
def setValue(LinkedHashMap eventDataMap) {
- def sentMode = eventDataMap['value']
- println("The location is changed to $sentMode!")
- this.mode = sentMode
- sendEvent(eventDataMap)
+ if (this.mode != eventDataMap['value']) {
+ def sentMode = eventDataMap['value']
+ println("The location is changed to $sentMode!")
+ this.mode = sentMode
+ sendEvent(eventDataMap)
+ }
}
def currentValue(String deviceFeature) {