+ def setColor(LinkedHashMap metaData) {
+ if ((this.level != metaData["level"]) || (this.hue != metaData["hue"]) || (this.saturation != metaData["saturation"])) {
+ this.level = metaData["level"]
+ this.currentLevel = metaData["level"]
+ this.rate = metaData["level"]
+ this.currentRate = metaData["level"]
+ this.hue = metaData["hue"]
+ this.currentHue = metaData["hue"]
+ this.saturation = metaData["saturation"]
+ this.currentSaturation = metaData["saturation"]
+ switchLevels[0].setColor(metaData)
+ }
+ }
+
+ def setLevel(String level) {
+ def newLevel = level.toInteger()
+ setLevel(newLevel)
+ }
+