Update speaker-mood-music.groovy
[smartapps.git] / third-party / Hue-Party-Mode.groovy
index 0bcda0334311f2c3cca42351e9f601139d04a574..5828052b8658da550d1f8640ca0a002fbc7e6ed1 100755 (executable)
@@ -57,12 +57,13 @@ def installed() {
     updated()
 }
 
+// input "light", "capability.colorControl"
 def updated() {
     log.debug("Updated with settings: ${settings}")
     unsubscribe()
     subscribe(app, onAppTouch)
     for (light in lights) {
-       subscribe(light, "off", onLightOff)
+       subscribe(light, "switch.off", onLightOff)
     }
     
     
@@ -99,9 +100,9 @@ def changeColor() {
     def nextHue = new Random().nextInt(101)
     def nextSat = new Random().nextInt(51)+50
     //def nextColor = Integer.toHexString(new Random().nextInt(0x1000000))
-    log.debug nextColor
+    //log.debug nextColor
     lights*.setColor(hue: nextHue, saturation: nextSat)
-    runIn(settings.interval, changeColor)
+    //runIn(settings.interval, changeColor)
 }
 
 def start() {