//Create a class for color temperature package ColorTemperature import SmartThing.SmartThing public class ColorTemperature extends SmartThing { // id, label, and display name of the device String id String label String displayName // Maps from features to values HashMap deviceIntValuesMap = new HashMap() ColorTemperature(Closure sendEvent, String id, String label, String displayName, Integer colorTemperature) { deviceIntValueSmartThing = deviceIntValuesMap idSmartThing = id labelSmartThing = label displayNameSmartThing = displayName sendEventSmartThings = sendEvent // Initialization this.id = id this.label = label this.displayName = displayName deviceIntValuesMap.put("colorTemperature", currentColorTemperature) } // Methods to set values def setColorTemperature(int newValue) { action(newValue, "colorTemperature") } }