Changes in classes: new concept for latest value + all types of events generated...
[smartthings-infrastructure.git] / PresenceSensor / PresenceSensor.groovy
index 5f15a6f60febaf7ba031d4eca8721707ad7ebf3b..c1553fb942d1ac05e3d71d7c02ea40ac306c39e9 100644 (file)
@@ -20,8 +20,8 @@ public class PresenceSensor {
        }
 
        def setValue(String value) {
-               this.presenceLatestValue = presence
                println("the presence sensor with id:$id is triggered to $value!")
+               this.presenceLatestValue = value
                this.presence = value
                this.currentPresence = value
        }