}
// 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);
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!")
}