Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / ColorTemperature / ColorTemperatures.groovy
index 952bfcd..aea5279 100644 (file)
@@ -25,6 +25,17 @@ public class ColorTemperatures {
                this.deviceNumbers = deviceNumbers
                this.colorTemperatues = []
 
+               def initLevel = Verify.getIntFromList(50, 70)
+               this.level = initLevel 
+               def initTemp = Verify.getIntFromList(10000, 15000)
+               this.colorTemperature = initTemp 
+               def init = Verify.getBoolean
+               if (init) {
+                       this.currentSwitch = "off"
+               } else {
+                       this.currentSwitch = "on"
+               }
+
                colorTemperatues.add(new ColorTemperature(sendEvent, id, label, displayName, this.level, this.currentSwitch, this.colorTemperature))
        }