Fixing some bugs
[smartthings-infrastructure.git] / ThreeAxis / ThreeAxis.groovy
index 83c1a59..3e5e817 100644 (file)
@@ -24,13 +24,17 @@ public class ThreeAxis {
                println("the three axis of cube is chagned to $threeAxis!")
        }
 
                println("the three axis of cube is chagned to $threeAxis!")
        }
 
+       def currentState(String deviceFeature) {
+               currentValue(deviceFeature)
+       }
+
        def currentValue(String deviceFeature) {
        def currentValue(String deviceFeature) {
-               if (deviceFeature == "threeAxis")
+               if (deviceFeature == "threeAxis" || deviceFeature == "status")
                        return threeAxis
        }
 
        def latestValue(String deviceFeature) {
                        return threeAxis
        }
 
        def latestValue(String deviceFeature) {
-               if (deviceFeature == "threeAxis")
+               if (deviceFeature == "threeAxis" || deviceFeature == "status")
                        return threeAxis
        }
 }
                        return threeAxis
        }
 }