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:
e35f414
)
Cancelling the changes for field write.
author
rtrimana
<rtrimana@uci.edu>
Fri, 18 Oct 2019 20:21:39 +0000
(13:21 -0700)
committer
rtrimana
<rtrimana@uci.edu>
Fri, 18 Oct 2019 20:21:39 +0000
(13:21 -0700)
Location/LocationVar.groovy
patch
|
blob
|
history
diff --git
a/Location/LocationVar.groovy
b/Location/LocationVar.groovy
index
88f34d6
..
3f5e46e
100755
(executable)
--- a/
Location/LocationVar.groovy
+++ b/
Location/LocationVar.groovy
@@
-3,14
+3,14
@@
package Location
class LocationVar {
private int contactBookEnabled
class LocationVar {
private int contactBookEnabled
-
private def modes
+ private def modes
private def timeZone
private def hubs
private def timeZone
private def hubs
-
private String mode
+ private String mode
private String locationMode
private String name
private String locationMode
private String name
-
private List contacts
-
private List phoneNumbers
+ private List contacts
+ private List phoneNumbers
private String temperatureScale
def sendEvent
private String temperatureScale
def sendEvent
@@
-53,19
+53,8
@@
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!")
- if (sentMode == "home") {
- this.mode = "home"
- this.locationMode = "home"
- } else if (sentMode == "away") {
- this.mode = "away"
- this.locationMode = "away"
- } else if (sentMode == "night") {
- this.mode = "night"
- this.locationMode = "night"
- } else {
- this.mode = sentMode
- this.locationMode = sentMode
- }
+ this.mode = sentMode
+ this.locationMode = sentMode
sendEvent(eventDataMap)
}
}
sendEvent(eventDataMap)
}
}