From a3f4618b470eb84dec709f3ea98104365543c6cb Mon Sep 17 00:00:00 2001 From: Seyed Amir Hossein Aqajari Date: Fri, 31 Jan 2020 12:38:28 -0800 Subject: [PATCH] Infrastructure compatible with locks, alarms, and thermostats group --- SmartThing/SmartThing.groovy | 4 ++-- SmartThing/SmartThings.groovy | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 } -- 2.34.1