Help with bulb CCT Code

Hi All,

I am a new user waiting for my first set of hardware to arrive including a few plug-ins, motion detector, and an Osram bulb. In preparation for receiving it, I am trying to write a few basic programs. I have written one that seems to be simple, but I get an error when I run it in the simulator. I have two questions. 1) Does anyone see my problem? (the error message and code is below) 2) Is there a better way to debug code?

Error Message: "grails.validation.ValidationException: Validation Error(s) occurred during save():

name: “Office Light”,
namespace: “jcdeaton”,
author: “John Deaton”,
description: “Controls my office light”,
category: “Convenience”,
iconUrl: “”,
iconX2Url: “”,
iconX3Url: “”)

preferences {
section(“Turn on when motion is detected:”) {
input “mymotionsensor”, “capability.motionSensor”, required: true, title: “Where?”

section("Turn on this bulb") {
	input "mylightbulb", "capability.colorTemperature", required: true, title: "bulb"

/*section("At this color temperature") {
	input "colortemperature", "number", required: true, title: "color temperature", range: "2700..6500"


def installed() {
log.debug “Installed with settings: ${settings}”



def updated() {
log.debug “Updated with settings: ${settings}”



def initialize() {
subscribe(mymotionsensor, “”, motionActiveHandler)

def motionActiveHandler(evt) {

How do I format code properly on the forum?