X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=blobdiff_plain;f=ThreeAxis%2FThreeAxis.groovy;h=3e5e817f62c5a478c38b9b3d42f96d4b1404fe03;hp=83c1a5966765cd5b402f3d1dfce65f1e6bf62cbc;hb=a506caeba94b4c035e0c47f29017f07773e3f318;hpb=3f6803e106343cf2acdb7ebd80a36cbcc98672dd 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 } }