From 895bb616c6c2a7ae845b67c2a30dadc646cad9b6 Mon Sep 17 00:00:00 2001 From: amiraj Date: Tue, 6 Aug 2019 19:04:47 -0700 Subject: [PATCH] Infrastructure compatible with all groups now! --- Location/LocationVar.groovy | 5 +++++ Variables and events for each device | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/Location/LocationVar.groovy b/Location/LocationVar.groovy index d006c4e..3f28a0b 100644 --- a/Location/LocationVar.groovy +++ b/Location/LocationVar.groovy @@ -36,4 +36,9 @@ class LocationVar { this.mode = sentMode sendEvent(eventDataMap) } + + def currentValue(String deviceFeature) { + if (deviceFeature == "sunsetTime" || deviceFeature == "sunset") + return System.currentTimeMillis() + } } diff --git a/Variables and events for each device b/Variables and events for each device index cd0d297..19d4503 100644 --- a/Variables and events for each device +++ b/Variables and events for each device @@ -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*/ // ------------------------------------------------------------------------------- -- 2.34.1