Removing getXXX methods + properties. Adding getProperty feature to SmartThing(s)
[smartthings-infrastructure.git] / Methods / setLocationMode.groovy
index aa7424bf19130ccb1c59b1b9502e85da011d27ab..ece6c86f58b646b8d30ed65a485a1f2b6fbced9f 100644 (file)
@@ -1,8 +1,8 @@
 /////////////////////////////////////////////////////////////////////
 def setLocationMode(String mode) {
-       location.setValue([name: "Location", value: "$mode", deviceId: "locationID0", descriptionText: "",
-                          displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+       log.debug "DEBUG: setLocationMode is called. Current mode is: ${location_mode} and new mode is: ${mode}"
        location.setValue([name: "mode", value: "$mode", deviceId: "locationID0", descriptionText: "",
                           displayed: true, linkText: "", isStateChange: false, unit: "", data: '{"info": "info"}'])
+       location_mode = mode
 }