Xiaomi Yeelight E27 bulb component

Ok, I have something working.

Configuration : http://pastebin.com/AxCsvtzF
Download https://gist.github.com/jjensn/83dd60d96330bbf66e58dfae336187bf to homeassistant/components/light/

Is there already a way to start the flow effect on the bulbs from within HA?
i saw in the deps yeelight folder there is a file called flow.py. But im not sure if it already can be used somehow?

2nd generation Yeelight bulb
I also saw on the yeelight forum that they are developing the second generation of the bulb and it is expected to release in July this year. They will have higher brightness.

There’s only support for “flash” which uses the flow to flash the light a few times. If you are interested in implementing more flows please take a look at the code how it can be done.

edit: thanks for the info about new bulb, sounds nice!

1 Like

The upcoming release of homeassistant should hopefully fix this, related to https://github.com/home-assistant/home-assistant/pull/6799

I’ve been using this fixed component for a couple of days and it works perfect.

Thank you. Unfortunately i’m not so good at understanding the code. I found a yeelight command line tool and i managed to know how to add colorflows there. So i think i will use that for now.

I was trying to use the flash option, but i didn’t manage to get it working.
The error log shows Flash supported currently only in RGB mode
I tried it with music mode on and off. I have only RGB bulbs. But they are not in RGB mode?

i did try this script and also did try a scene and doing it by the services panel

 flash_light_kevin:
    alias: "Flash light Kevin"
    sequence:
      - service: light.turn_on
        entity_id: light.kevin
        data:
          flash: short

I got around it by removing these lines of code (260-262):

    if self._bulb.last_properties["color_mode"] != 1:
        _LOGGER.error("Flash supported currently only in RGB mode.")
        return

besides getting flash to work. I also managed to get some basic effects added.

I set that check there because I wasn’t sure how the bulb would respond to those commands when it’s in a different mode.

Could you please prepare a patch to get your basic effects & this change into homeassistant? :slight_smile:

Yes i can do some testing to check if there is some strange behaviour. Not noticed anything yet. I will look into on how to make a PR maybe at the end of this weekend or somewhere next week.

1 Like

anyone have the transition component working on this lights? in my configuration don’t work…

  - platform: yeelight
    devices:
      10.10.10.216:
        name: Room - Nico - RGB
        transition: 3000
        use_music_mode: True
        #save_on_change: False

@Mister-Espria great! Some instructions how to make pull requests can be found here: https://home-assistant.io/developers/development_submitting/

How it doesn’t work? Any logs? Btw, if you don’t have a specific need for the music mode, you should consider disabling it.

I don’t have any logs… but when I enable it in config… restart home assistant then turn on my yeelight bulb I can saw that transition don’t work. @teprrr

Thank you! I have the PR ready and submitted. You can find it here #7152.

Is the RGB version actually RGBW or you can´t get white?

What are the benefits of Yeelight compared to the cheaper Miilight/LimitlessLed?

The developer mode can be enabled with MJTD01YL desk lamp, but the component does not support the light, can you solve it?

You need to be more precise how it isn’t supported? Does it work with yeecli? If you enable logging do you get some errors?

Yes, it is rgbw, it has 9 white LEDs and 10 rgb ones.

Does yeelight component support HA built-in light profiles (relax, energize, concentrate, reading)?