Changes in classes: new concept for latest value + all types of events generated...
[smartthings-infrastructure.git] / MotionSensor / MotionSensor.groovy
index 825fe332a75b33c6d42b7be8e6bbf3fd77ebb938..79fbf9b5b018b71054fe72ac8de51005fd005b7d 100644 (file)
@@ -22,8 +22,8 @@ public class MotionSensor {
        }
 
        def setValue(String value) {
-               this.motionLatestValue = motion
                println("the motion sensor with id:$id is triggered to $value!")
+               this.motionLatestValue = value
                this.motion = value
                this.currentMotion = value
                this.states.add(value)