'Turn the switch on.'

def turn_on(self, **kwargs):

    brightness = kwargs.get(ATTR_BRIGHTNESS)
    rgb_color = kwargs.get(ATTR_RGB_COLOR)
    color_temp_mired = kwargs.get(ATTR_COLOR_TEMP)
    state_kwargs = {}
    if rgb_color:
        if self.wink.supports_xy_color():
            xyb = color_util.color_RGB_to_xy(*rgb_color)
            state_kwargs['color_xy'] = (xyb[0], xyb[1])
            state_kwargs['brightness'] = xyb[2]
        if self.wink.supports_hue_saturation():
            hsv = colorsys.rgb_to_hsv(rgb_color[0], rgb_color[1], rgb_color[2])
            state_kwargs['color_hue_saturation'] = (hsv[0], hsv[1])
    if color_temp_mired:
        state_kwargs['color_kelvin'] = mired_to_kelvin(color_temp_mired)
    if brightness:
        state_kwargs['brightness'] = (brightness / 255.0)
    self.wink.set_state(True, **state_kwargs)
