X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=ThreeAxis%2FThreeAxis.groovy;h=3e5e817f62c5a478c38b9b3d42f96d4b1404fe03;hb=a506caeba94b4c035e0c47f29017f07773e3f318;hp=83c1a5966765cd5b402f3d1dfce65f1e6bf62cbc;hpb=e9196e0f9b6d29e4f5d9fbe51e15b5a6e7fe00b7;p=smartthings-infrastructure.git diff --git a/ThreeAxis/ThreeAxis.groovy b/ThreeAxis/ThreeAxis.groovy index 83c1a59..3e5e817 100644 --- a/ThreeAxis/ThreeAxis.groovy +++ b/ThreeAxis/ThreeAxis.groovy @@ -24,13 +24,17 @@ public class ThreeAxis { println("the three axis of cube is chagned to $threeAxis!") } + def currentState(String deviceFeature) { + currentValue(deviceFeature) + } + def currentValue(String deviceFeature) { - if (deviceFeature == "threeAxis") + if (deviceFeature == "threeAxis" || deviceFeature == "status") return threeAxis } def latestValue(String deviceFeature) { - if (deviceFeature == "threeAxis") + if (deviceFeature == "threeAxis" || deviceFeature == "status") return threeAxis } }