X-Git-Url: http://plrg.eecs.uci.edu/git/?p=smartthings-infrastructure.git;a=blobdiff_plain;f=ColorTemperature%2FColorTemperatures.groovy;h=aea527995d14b286e5f23ca21ebca1574d0cab9b;hp=952bfcd86759678e50453bf4d3fa40c3cfc58205;hb=b7cf952d275d7cb67250c52404cf855ef57c1119;hpb=82c36a5ffeaebe290f3aadf2edebb5bb32480cb5 diff --git a/ColorTemperature/ColorTemperatures.groovy b/ColorTemperature/ColorTemperatures.groovy index 952bfcd..aea5279 100644 --- a/ColorTemperature/ColorTemperatures.groovy +++ b/ColorTemperature/ColorTemperatures.groovy @@ -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)) }