Fixing a bug in ColorControl.
[smartthings-infrastructure.git] / CarbonMonoxideDetector / CarbonMonoxideDetector.groovy
index 29434795734306a93867b04df5706f07c8d395d5..213d1531d3ec79c7353f6d893d55f0c885dfe859 100644 (file)
@@ -20,8 +20,8 @@ public class CarbonMonoxideDetector {
        }
 
        def setValue(String value) {
-               this.carbonMonoxideLatestValue = carbonMonoxide
                println("the carbon monoxide detector with id:$id is triggered to $value!")
+               this.carbonMonoxideLatestValue = value
                this.carbonMonoxide = value
                this.currentCarbonMonoxideValue = value
        }