'Instruct the light to turn on, optionally set colour/brightness.'

def turn_on(self, **kwargs):

    if (not kwargs):
        self._light.turn_on()
    elif ((ATTR_RGB_COLOR in kwargs) and (ATTR_BRIGHTNESS in kwargs)):
        rgb = kwargs[ATTR_RGB_COLOR]
        bright = int(((kwargs[ATTR_BRIGHTNESS] / 255) * 100))
        self._light.set_all(rgb[0], rgb[1], rgb[2], bright)
    elif (ATTR_RGB_COLOR in kwargs):
        rgb = kwargs[ATTR_RGB_COLOR]
        self._light.set_rgb_color(rgb[0], rgb[1], rgb[2])
    elif (ATTR_BRIGHTNESS in kwargs):
        bright = int(((kwargs[ATTR_BRIGHTNESS] / 255) * 100))
        self._light.set_brightness(bright)
