//Create a class for color temperature package ColorTemperature import SmartThing.SmartThings //Importing mutable integer class import MutableInteger.MutableInteger public class ColorTemperatures extends SmartThings { List colorTemperatues = new ArrayList() ColorTemperatures(Closure sendEvent, boolean init) { // Only initialize one time since we only have one device for each capability colorTemperatues = smartThings // Initialization StringBuilder id = new StringBuilder("colorTemperatureID0") StringBuilder label = new StringBuilder("colorTemperature") StringBuilder displayName = new StringBuilder("colorTemperature0") MutableInteger colorTemperatue = new MutableInteger() if (init) colorTemperature = 10000 else colorTemperatues = 15000 colorTemperatues.add(new ColorTemperature(sendEvent, id, label, displayName, colorTemperature)) } // Methods to set values def setColorTemperature(int newValue) { colorTemperatues[0].setColorTemperature(newValue) } // Methods to return values def getCurrentColorTemperature() { List tmpValues = new ArrayList() tmpValues.add(colorTemperatues[0].getCurrentColorTemperature()) return tmpValues } }