Adding missing methods and condition.
[smartthings-infrastructure.git] / ColorControl / ColorControls.groovy
index 9b003f6..90223c5 100644 (file)
@@ -205,6 +205,14 @@ public class ColorControls {
                }
        }
 
                }
        }
 
+       def setLevel(long level) {
+               if (level != this.level) {
+                       this.currentLevel = level
+                       this.level = level
+                       colorControls[0].setLevel(level)
+               }
+       }
+
        def setColorTemperature(int colorTemperature) {
                if (colorTemperature != this.colorTemperature) {
                        this.colorTemperature = colorTemperature
        def setColorTemperature(int colorTemperature) {
                if (colorTemperature != this.colorTemperature) {
                        this.colorTemperature = colorTemperature