'Turn the light on.'

def turn_on(self, **kwargs):

    transitiontime = int(kwargs.get(ATTR_TRANSITION, 0))
    if (ATTR_XY_COLOR in kwargs):
        xycolor = kwargs[ATTR_XY_COLOR]
    elif (ATTR_RGB_COLOR in kwargs):
        xycolor = color_util.color_RGB_to_xy(*(int(val) for val in kwargs[ATTR_RGB_COLOR]))
        kwargs.setdefault(ATTR_BRIGHTNESS, xycolor[2])
    else:
        xycolor = None
    if (xycolor is not None):
        self.device.set_color(xycolor, transition=transitiontime)
    if (ATTR_COLOR_TEMP in kwargs):
        colortemp = kwargs[ATTR_COLOR_TEMP]
        self.device.set_temperature(mireds=colortemp, transition=transitiontime)
    if (ATTR_BRIGHTNESS in kwargs):
        brightness = kwargs.get(ATTR_BRIGHTNESS, (self.brightness or 255))
        self.device.turn_on(level=brightness, transition=transitiontime)
    else:
        self.device.turn_on(transition=transitiontime)
