//Create a class for SmartThings
package SmartThing
-class SmartThings {
+public class SmartThings {
List smartThings = new ArrayList()
// Methods for closures
}
// Methods to return states of the devices
- def getProperty(String currentProperty) {
+ def propertyMissing(String currentProperty) {
+ if (smartThings[0] == null)
+ return
List tmpValues = new ArrayList()
tmpValues.add(smartThings[0].getProperty(currentProperty))
return tmpValues