Merge branch 'master' of ssh://plrg.eecs.uci.edu/home/git/smartthings-infrastructure
[smartthings-infrastructure.git] / ColorControl / ColorControls.groovy
index d96b978d774579c4f7efcb2519d86d8b4adb9985..3538447ce14bad689fd59d4e68a8e752d8d49219 100644 (file)
@@ -23,6 +23,19 @@ public class ColorControls {
                this.sendEvent = sendEvent
                this.deviceNumbers = deviceNumbers
                this.colorControls = []
+               
+               def initHue = Verify.getIntFromList(30, 50, 70)
+               this.hue = initHue
+               def initSat = Verify.getIntFromList(40, 50, 60)
+               this.saturation = initSat
+               def init = Verify.getInt(0,2)
+               if (init == 0) {
+                       this.color = "red"
+               } else if (init == 1) {
+                       this.color = "green"
+               } else {
+                       this.color = "blue"
+               }
 
                def initHue = Verify.getIntFromList(30, 50, 70)
                this.hue = initHue