def turn_on(self, **kwargs):
        if ATTR_TRANSITION in kwargs:
            fade = kwargs[ATTR_TRANSITION] * 1000
        else:
            fade = 0

        if ATTR_RGB_COLOR in kwargs:
            hue, saturation, brightness = \
                convert_rgb_to_hsv(kwargs[ATTR_RGB_COLOR])
        else:
            hue = self._hue
            saturation = self._sat
            brightness = self._bri

        if ATTR_BRIGHTNESS in kwargs:
            brightness = kwargs[ATTR_BRIGHTNESS] * (BYTE_MAX + 1)
        else:
            brightness = self._bri

        if ATTR_COLOR_TEMP in kwargs:
            # pylint: disable=fixme
            # TODO: Use color_temperature_mired_to_kelvin from util.color
            kelvin = int(((TEMP_MAX - TEMP_MIN) *
                          (kwargs[ATTR_COLOR_TEMP] - TEMP_MIN_HASS) /
                          (TEMP_MAX_HASS - TEMP_MIN_HASS)) + TEMP_MIN)
        else:
            kelvin = self._kel

        _LOGGER.debug("turn_on: %s (%d) %d %d %d %d %d",
                      self._ip, self._power,
                      hue, saturation, brightness, kelvin, fade)

        if self._power == 0:
            self._liffylights.set_power(self._ip, 65535, fade)

        self._liffylights.set_color(self._ip, hue, saturation,
                                    brightness, kelvin, fade)
Turn the device on.
dataset/ETHPy150Open home-assistant/home-assistant/homeassistant/components/light/lifx.py/LIFXLight.turn_on