Infrastructure compatible with locks, alarms, and thermostats group
[smartthings-infrastructure.git] / SmartThing / SmartThing.groovy
index 1f46551234af7f69b9a1f93c3d438d6cc046332a..b869773031db6367270e65edbc88d3291137f6a9 100644 (file)
@@ -122,7 +122,7 @@ public class SmartThing {
        }
 
        // Methods to return values
-       def getProperty(String currentProperty) {
+       def propertyMissing(String currentProperty) {
                String property = currentProperty
                if (property.contains("current")) // Check to see if we have currentXXX or xxx
                        property = property.substring(7,8).toLowerCase()+property.substring(8);
@@ -142,9 +142,9 @@ public class SmartThing {
        
        def currentValue(String deviceFeature) {
                if (deviceValueSmartThing.containsKey(deviceFeature)) {
-                       return deviceValueSmartThing.get(deviceFeature).toString()
+                       return deviceValueSmartThing.get(deviceFeature)
                } else if (deviceIntValueSmartThing.containsKey(deviceFeature)) {
-                       return deviceIntValueSmartThing.get(deviceFeature).getValue()   
+                       return deviceIntValueSmartThing.get(deviceFeature)      
                } else {
                        println("Wrong device feature is sent to this method!")
                }