Infrastructure compatible with all groups now!
authoramiraj <amiraj.95@uci.edu>
Wed, 7 Aug 2019 02:04:47 +0000 (19:04 -0700)
committeramiraj <amiraj.95@uci.edu>
Wed, 7 Aug 2019 02:04:47 +0000 (19:04 -0700)
Location/LocationVar.groovy
Variables and events for each device

index d006c4e..3f28a0b 100644 (file)
@@ -36,4 +36,9 @@ class LocationVar {
                this.mode = sentMode
                sendEvent(eventDataMap)
        }
+
+       def currentValue(String deviceFeature) {
+               if (deviceFeature == "sunsetTime" || deviceFeature == "sunset")
+                       return System.currentTimeMillis()
+       }
 }
index cd0d297..19d4503 100644 (file)
@@ -55,6 +55,10 @@ locationObject.setValue([name: "sunset", value: "sunset", deviceId: "locationID0
 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
 locationObject.setValue([name: "sunrise", value: "sunrise", deviceId: "locationID0", descriptionText: "",
 displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+locationObject.setValue([name: "sunsetTime", value: "sunset", deviceId: "locationID0", descriptionText: "",
+displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+locationObject.setValue([name: "sunriseTime", value: "sunrise", deviceId: "locationID0", descriptionText: "",
+displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
 /*events*/
 //
 -------------------------------------------------------------------------------