From: Seyed Amir Hossein Aqajari Date: Fri, 31 Jan 2020 20:38:28 +0000 (-0800) Subject: Infrastructure compatible with locks, alarms, and thermostats group X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=commitdiff_plain;h=a3f4618b470eb84dec709f3ea98104365543c6cb Infrastructure compatible with locks, alarms, and thermostats group --- diff --git a/SmartThing/SmartThing.groovy b/SmartThing/SmartThing.groovy index 7b3b26e..b869773 100644 --- a/SmartThing/SmartThing.groovy +++ b/SmartThing/SmartThing.groovy @@ -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!") } diff --git a/SmartThing/SmartThings.groovy b/SmartThing/SmartThings.groovy index 3e1d4e0..469c3c0 100644 --- a/SmartThing/SmartThings.groovy +++ b/SmartThing/SmartThings.groovy @@ -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 }