projects
/
smartthings-infrastructure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c511e99
)
Changing the writes to the fields into real String values (the listener needs real...
author
rtrimana
<rtrimana@uci.edu>
Fri, 18 Oct 2019 17:19:21 +0000
(10:19 -0700)
committer
rtrimana
<rtrimana@uci.edu>
Fri, 18 Oct 2019 17:19:21 +0000
(10:19 -0700)
Location/LocationVar.groovy
patch
|
blob
|
history
diff --git
a/Location/LocationVar.groovy
b/Location/LocationVar.groovy
index eeaa9472c381f35eb5350a349bc67eb0c55b6f67..e2cf09b65f50a6d30c7b34ba99ebc0292c83ea4b 100755
(executable)
--- a/
Location/LocationVar.groovy
+++ b/
Location/LocationVar.groovy
@@
-53,8
+53,16
@@
class LocationVar {
if (this.mode != eventDataMap['value']) {
def sentMode = eventDataMap['value']
println("The location is changed to $sentMode!")
if (this.mode != eventDataMap['value']) {
def sentMode = eventDataMap['value']
println("The location is changed to $sentMode!")
- this.mode = sentMode
- this.locationMode = sentMode
+ if (sentMode == "home") {
+ this.mode = "home"
+ this.locationMode = "home"
+ } else if (sentMode == "away") {
+ this.mode = "away"
+ this.locationMode = "away"
+ } else {
+ this.mode = "night"
+ this.locationMode = "night"
+ }
sendEvent(eventDataMap)
}
}
sendEvent(eventDataMap)
}
}