projects
/
smartthings-infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f4d0ca5
)
Check if only sent mode is different with current mode, send event in Location class!
author
amiraj
<amiraj.95@uci.edu>
Fri, 9 Aug 2019 00:28:52 +0000
(17:28 -0700)
committer
amiraj
<amiraj.95@uci.edu>
Fri, 9 Aug 2019 00:28:52 +0000
(17:28 -0700)
Location/LocationVar.groovy
patch
|
blob
|
history
diff --git
a/Location/LocationVar.groovy
b/Location/LocationVar.groovy
index a114c1f019bf02ee1b8a29beacdf566e62a0b519..99f3429f7a4d81a56604193df017f7c319af390d 100644
(file)
--- a/
Location/LocationVar.groovy
+++ b/
Location/LocationVar.groovy
@@
-47,10
+47,12
@@
class LocationVar {
//By Model Checker
def setValue(LinkedHashMap eventDataMap) {
//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) {
}
def currentValue(String deviceFeature) {