Infrastructure now works for: locks, alarms, thermostats, and non-hue lights.
[smartthings-infrastructure.git] / SwitchLevel / SwitchLevel.groovy
index 8782365c322147d3d01655b98b77c51419f8e860..24bd7bfa0f3b03aba3b026067cdfaa1171641297 100644 (file)
@@ -108,4 +108,21 @@ public class SwitchLevel {
                        this.rate = value.toInteger()
                }
        }
+
+
+       def currentValue(String deviceFeature) {
+               if (deviceFeature == "level") {
+                       return level
+               } else if (deviceFeature == "switch") {
+                       return switchState
+               }
+       }
+
+       def latestValue(String deviceFeature) {
+               if (deviceFeature == "level") {
+                       return level
+               } else if (deviceFeature == "switch") {
+                       return switchState
+               }
+       }
 }