Fixing bugs in infrastructure
[smartthings-infrastructure.git] / Location / LocationVar.groovy
index 6a8e6d3065d6535e60b39f7402ec9f27977cf187..403055d6b6dc331315d6aa2d7de4491a1d1f415f 100755 (executable)
@@ -27,6 +27,7 @@ public class LocationVar extends SmartThing {
                        sendEventSmartThings = sendEvent
 
                        // Initialization
+                       String mode
                        helloHome = new Phrase()
                        contacts = ['AJ']
                        phoneNumbers = [9495379373]
@@ -35,9 +36,9 @@ public class LocationVar extends SmartThing {
                        hubs = [[id:0, localIP:"128.195.204.105"]]
 
                        if (init)
-                               mode.append("away")     
+                               mode = "away"   
                        else
-                               mode.append("home")
+                               mode = "home"
 
                        deviceValuesMap.put("mode", mode)
                        deviceValuesMap.put("name", "hub0")