Fixing some bugs
[smartthings-infrastructure.git] / ThreeAxis / ThreeAxis.groovy
index 83c1a5966765cd5b402f3d1dfce65f1e6bf62cbc..3e5e817f62c5a478c38b9b3d42f96d4b1404fe03 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
        }
 }