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)
}
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() {