Infrastructure compatible with all groups now!
[smartthings-infrastructure.git] / Location / LocationVar.groovy
index ca20cff63e615262e02dbc1eed6704091554911b..3f28a0bfbe2100dc105cb8968a0fb2238211af80 100644 (file)
@@ -10,8 +10,9 @@ class LocationVar {
        private String name
        private List contacts
        private List phoneNumbers
+       private String temperatureScale 
        def sendEvent
-    
+       
        private Phrase helloHome
 
        LocationVar(Closure sendEvent) {
@@ -25,6 +26,7 @@ class LocationVar {
                this.sendEvent = sendEvent
                this.timeZone = TimeZone.getTimeZone("America/New_York")
                this.name = "hub0"
+               this.temperatureScale = "F"
        }
 
        //By Model Checker
@@ -34,4 +36,9 @@ class LocationVar {
                this.mode = sentMode
                sendEvent(eventDataMap)
        }
+
+       def currentValue(String deviceFeature) {
+               if (deviceFeature == "sunsetTime" || deviceFeature == "sunset")
+                       return System.currentTimeMillis()
+       }
 }