+ def setLevel(int level) {
+ if (level != this.level) {
+ this.currentLevel = level
+ this.level = level
+ colorControls[0].setLevel(level)
+ }
+ }
+
+ def setLevel(long level) {
+ if (level != this.level) {
+ this.currentLevel = level
+ this.level = level
+ colorControls[0].setLevel(level)
+ }
+ }
+
+ def setColorTemperature(int colorTemperature) {
+ if (colorTemperature != this.colorTemperature) {
+ this.colorTemperature = colorTemperature
+ colorControls[0].setColorTemperature(colorTemperature)
+ }
+ }
+
+ def setColorTemperature(long colorTemperature) {
+ if (colorTemperature != this.colorTemperature) {
+ this.colorTemperature = colorTemperature
+ colorControls[0].setColorTemperature(colorTemperature)
+ }
+ }
+
+ def on() {
+ if (this.currentSwitch != "on") {
+ this.currentSwitch = "on"
+ colorControls[0].on()
+ }
+ }
+
+ def off() {
+ if (this.currentSwitch != "off") {
+ this.currentSwitch = "off"
+ colorControls[0].off()
+ }
+ }
+