Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / ColorTemperature / ColorTemperatures.groovy
index 952bfcd86759678e50453bf4d3fa40c3cfc58205..aea527995d14b286e5f23ca21ebca1574d0cab9b 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))
        }