Changing a bit in location class to behave as the same as other devices to find the...
authoramiraj <amiraj.95@uci.edu>
Wed, 16 Oct 2019 22:21:09 +0000 (15:21 -0700)
committeramiraj <amiraj.95@uci.edu>
Wed, 16 Oct 2019 22:21:09 +0000 (15:21 -0700)
Location/LocationVar.groovy

index 99f3429f7a4d81a56604193df017f7c319af390d..eeaa9472c381f35eb5350a349bc67eb0c55b6f67 100755 (executable)
@@ -7,6 +7,7 @@ class LocationVar {
        private def timeZone
        private def hubs
        private String mode
+       private String locationMode
        private String name
        private List contacts
        private List phoneNumbers
@@ -21,6 +22,7 @@ class LocationVar {
                                this.hubs = [[id:0, localIP:"128.195.204.105"]]
                                this.modes = [[name: "home"],[name: "away"],[name: "night"]]
                                this.mode = "away"
+                               this.locationMode = "away"
                                this.helloHome = new Phrase()
                                this.contactBookEnabled = 1
                                this.contacts = ['AJ']
@@ -33,6 +35,7 @@ class LocationVar {
                                this.hubs = [[id:0, localIP:"128.195.204.105"]]
                                this.modes = [[name: "home"],[name: "away"],[name: "night"]]
                                this.mode = "home"
+                               this.locationMode = "home"
                                this.helloHome = new Phrase()
                                this.contactBookEnabled = 1
                                this.contacts = ['AJ']
@@ -51,6 +54,7 @@ class LocationVar {
                        def sentMode = eventDataMap['value']
                        println("The location is changed to $sentMode!")
                        this.mode = sentMode
+                       this.locationMode = sentMode
                        sendEvent(eventDataMap)
                }
        }