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 7b3b26efd42ac1c56b91df5f92dd3b35f39b2b3f..b869773031db6367270e65edbc88d3291137f6a9 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 3e1d4e059bc33d5b62ebba760eccdeea60b93a7c..469c3c007f130edcf8ed444f37977d96914fb496 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
        }