projects
/
smartthings-infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Infrastructure compatible with all groups now!
[smartthings-infrastructure.git]
/
Location
/
LocationVar.groovy
diff --git
a/Location/LocationVar.groovy
b/Location/LocationVar.groovy
index d10206ba1e1d99a7b0f2ee3aba7ab3d4f67d066c..3f28a0bfbe2100dc105cb8968a0fb2238211af80 100644
(file)
--- a/
Location/LocationVar.groovy
+++ b/
Location/LocationVar.groovy
@@
-5,14
+5,18
@@
class LocationVar {
private int contactBookEnabled
private def modes
private def timeZone
private int contactBookEnabled
private def modes
private def timeZone
+ private def hubs
private String mode
private String mode
+ private String name
private List contacts
private List phoneNumbers
private List contacts
private List phoneNumbers
+ private String temperatureScale
def sendEvent
def sendEvent
-
+
private Phrase helloHome
LocationVar(Closure sendEvent) {
private Phrase helloHome
LocationVar(Closure sendEvent) {
+ this.hubs = [[id:0, localIP:"128.195.204.105"]]
this.modes = [[name: "home"],[name: "away"],[name: "night"]]
this.mode = "home"
this.helloHome = new Phrase()
this.modes = [[name: "home"],[name: "away"],[name: "night"]]
this.mode = "home"
this.helloHome = new Phrase()
@@
-21,6
+25,8
@@
class LocationVar {
this.phoneNumbers = [9495379373]
this.sendEvent = sendEvent
this.timeZone = TimeZone.getTimeZone("America/New_York")
this.phoneNumbers = [9495379373]
this.sendEvent = sendEvent
this.timeZone = TimeZone.getTimeZone("America/New_York")
+ this.name = "hub0"
+ this.temperatureScale = "F"
}
//By Model Checker
}
//By Model Checker
@@
-30,4
+36,9
@@
class LocationVar {
this.mode = sentMode
sendEvent(eventDataMap)
}
this.mode = sentMode
sendEvent(eventDataMap)
}
+
+ def currentValue(String deviceFeature) {
+ if (deviceFeature == "sunsetTime" || deviceFeature == "sunset")
+ return System.currentTimeMillis()
+ }
}
}