Xiaomi Yeelight E27 bulb component

The pull request has now been merged, so the next version should have the new version!

would this go in 37.1 or 38?

Thanks for the great work on YeeLight!
Has anyone been able to have Google Home control these lights (beyond On and Off)?

What’s in the new version? Will it supports the white bulb? Right now, I’m using @mxtra version as custom component. It works perfectly. I’m wondering why is this not the official component?

Yep it supports white and rgb. Look for all features here https://github.com/home-assistant/home-assistant/pull/5296

1 Like

Excellent! Can’t wait to move back to the official version.

for me don’t work with the official version

How does it not work? In case you are running a release version, it is not yet there.

I almost think this thread needs to be closed and a thread opened for the official version supported by HA and another thread for all of the other versions people are using.

Its confusing trying to follow this thread and people are using any number of pieces of code to try and get the Yeelights to work.

That’ll probably make sense after the new version of the component ships, but I hope that there won’t be no need for any other unofficial components after that. Of course it’d be nice to get more people testing it so that the release will go nicely, so if anyone here is already running the git version although still using some custom version, please do try and test out the new component.

I tested the new code from the dev branch that is to come out with 0.38 and it works.

You can download it from here https://raw.githubusercontent.com/home-assistant/home-assistant/dev/homeassistant/components/light/yeelight.py and place it in your .homeassistant/custom_components/light folder and restart.

Tried this out. Running 0.36.1 and the link above in my custom components folder. Both my white and RGB bulbs are showing the correct states (whites didn’t show the state on the front end previously) and selecting dimming on the white bulbs works now also. On the RGB bulbs everything seems to be working (dim, color select, white balance select). Ill have to try out some of the other components in the future (flash & transition) but for now this is awesome to have everything working and reporting the correct state.

@teprrr I’m on 0.38.0dev0
Transition dont’ work for me.
That’s my config:

  - platform: yeelight
    devices:
      10.10.10.239:
        name: Lounge - Sofà - RGB
        transition: 1000
        use_music_mode: True
        save_on_change: False  
      10.10.10.218:
        name: Lounge - Door - RGB
        transition: 1000
        use_music_mode: True
        save_on_change: False
      10.10.10.219:
        name: Lounge - Window - White
      10.10.10.216:
        name: Room - Nico - RGB
        transition: 1000
        use_music_mode: True
        save_on_change: False
      10.10.10.213:
        name: Kitchen - White

i’ve tryed this code but all my automation to turn_on lights on movement don’t work… the light turn on at the minimun brightness (of course in automation i’ve put brightness: 255) so i turn back to 1.0 beta without transition but working…

I’ve tested out the new component as of 0.37.1. It now says that it supports the white light, but it seems to have the same problem as before. It doesn’t register any state change on the front end when you try to switch it on. Although the bulb itself seems to turn on.

I think the component page was updated prematurely. The new update to the actual code is slated for 0.38 I believe.

Scroll up a few posts to the link to the new code. Drop that into your custom components folder as described. Should work for what you posted above. On/Off and registered on the front end after. A number of people have tested with the white and RGB bulbs.

@silvrr could you be more specific please?
I have tried all the code posted before… can’t get it work atm

@ciquattro. right click that link and save as as yeelight.py. Save it into a subfolder name light in your custom components folder. (If you don’t have either folder just create them in your main home assistant directory)

Then restart home assistant. I have tested this file on 36.1 and 37.1 and get the proper reporting of the state.

Hope that helps.

1 Like

My bulbs are getting the status “unavailable” time by time…

Anyone knows the reason?

Edit:

17-02-09 15:56:35 ERROR (Thread-12) [custom_components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
17-02-09 16:01:14 ERROR (Thread-7) [custom_components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
17-02-09 16:04:51 ERROR (Thread-8) [custom_components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
17-02-09 16:13:07 ERROR (Thread-6) [custom_components.light.yeelight] Unable to update bulb status: Bulb closed the connection.

Check your router to see if the bulbs are still connected to your network. In the past I have seen them drop off and come back on. I had one drop off awhile back and didn’t return until it was power cycled.