Infrastructure compatible with locks, alarms, and thermostats group
authorSeyed Amir Hossein Aqajari <saqajari@circinus-13.ics.uci.edu>
Fri, 31 Jan 2020 20:38:28 +0000 (12:38 -0800)
committerSeyed Amir Hossein Aqajari <saqajari@circinus-13.ics.uci.edu>
Fri, 31 Jan 2020 20:38:28 +0000 (12:38 -0800)
SmartThing/SmartThing.groovy
SmartThing/SmartThings.groovy

index 7b3b26e..b869773 100644 (file)
@@ -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!")
                }
index 3e1d4e0..469c3c0 100644 (file)
@@ -43,7 +43,7 @@ public class SmartThings {
                if (smartThings[0] == null)
                        return
                List tmpValues = new ArrayList()
-               tmpValues.add(smartThings[0].getProperty(currentProperty))
+               tmpValues.add(smartThings[0].propertyMissing(currentProperty))
                return tmpValues
        }