Xiaomi Yeelight E27 bulb component

I asked on Gearbest and they confirmed as well (in like, 5 minutes!)

Your original question is “Does this bulb support a developer mode like the rest of the Yeelight bulbs?”

Here is the answer from Our Customer service Team:

"

Hello Mike,

Sorry. this bulb not support developer mode.

For the devs out there, I was wondering if it would be possible to have the choice to define the bulb with its mac adress instead of IP address ? My ISP router does not allow for static IPs, therefore if it is rebooted almost all IPs change and I have to update the code for my bulb to work again…

EDIT: I finally managed to get static IP (there was a bug in my router depending on the language you set the interface, wtf). Anyway, it should be cool to have hass manage dynamic adress I think

1 Like

The problem with the mac address is that it’s not so easy to find it out versus trying to connect to an IP address. However, if you are using the hass’ discovery, the bulbs will be named after the MAC, e.g. light.yeelight_rgb_286c07acaaa.

yes I know, but when you declare the bulb in light: you must set the ip adress of the bulb. So I was asking if it was feasible to modify the component to make it accept the mac adress (or even the name) in order to easier for the user…

Hi. Can i turn off bulb with transition i automations? I tried this in automations.yaml and it’s not working

action:
  service: light.turn_off
  entity_id:
    - light.bathroom
  data:
    transition: 3   

I tried transition: 3000 but it’s the same bulb turns off immediately. Or a have to use script?

1 Like

Maybe instead of turn off you could set brightness to 0. In the end the result will be the same, but you may have a nice transition that way…

1 Like

Thanks for tip. I will try that. :slight_smile:

In logs i see that my white Yeelight is recognized as color bulb, type=BulbType.Color. Is that OK? And i simply can not make transitions to work. Can anyone share their working transition in automation? Thanks.

1 Like

Compared to milight light bulbs avaliable in my home setup, the yeelight colors are a little bit off. For instance if i set rgb:255,0,0 the color produced is a little bit yellowish. The problem at first seemed like a little hue offset but the offset changes. In the red region the produced hue is bigger(yellowish). While on the blue side the produced hue is smaller (on the green side). I also send a description from mihome app. Is there a way to fix this?

I think there is no way to have perfectly identical colors when you use different brands of bulbs. The light representation is hardware dependent, it changes with each brand, as the leds inside the bulbs are different (types, number,…), the plastic diffuser of the bulb has not the same color, thickness, diffusivity, transparency,…

I have LIFX and yeelight, and I had to fine tune the color_temp by trial and errors to get more or less the same whites on both. (LIFX is at 3200K, yeelight at 2985K). For the color the problem is the same than for the whites, but as I do not use color that much I did not bother to find the ‘perfect’ equilibrium.

I understand the different hardware, the plastics etc. The problem is more like: when I send rgb 255,0,0 only the red leds must light up. But I can see the green leds turning on too, giving a yellow hue. And when I send the rgb 0,0,255 I also see the green leds powering up. This looks like a conversion error in software more or less, not something with the hardware.

Ah ok, I did not get that. :smiley:
I just looked very quickly in the components code, I think that during the conversion, floats are transformed in integer at some point, and that leads to small errors, like your 255,0,0 may become after conversion 254,0,1 for instance. I can’t help you more on that topic, that is beyond the scope of my capacity. sorry :disappointed:

Thank you. I’ll try to make the mapping when I have the time.

I managed to message the firm. They replied that their bulbs simulate natural light and use cie 1931. so that when rgb (255 0 0) is used, the green channel is not necessarily 0. I asked for the values required for pure red, green and blue and didn’t have a return yet.

Also some other user reported that his colors are also off. The pure red has changed to yellow etc. They might fix this in another firmware update hopefuly.

1 Like

I hope this is the correct place for this problem I’m struggling with all day…:
I want to have different transition times for my Yeelight, obveously I can set the ‘default’ transition in my configuration via:

light:
  platform: yeelight
   devices:
     192.168.178.38:
       name: main
       transition: 500

but now if I want to have a scene with a longer transition time I thought I could simply create a scene like:

name: dim
  entities:
    light.main:
      state: on
      brightness: 255
      color_temp: 320
      transition: 2000

but this does only quickly turn on the light about 2 minutes 30 seconds after I activate the scene…
What am I doing wrong?

Added my two Xiaomi Desk Lamps using the Yeelight component yesterday and managed to control them using the front end, including effect, temperature and brightness. :slight_smile:

Seems to work fine most of the time, thus I noticed that they get unavailable at some time. Not sure if it is because the connection with the router (powerline and wifi) is a bit flaky in the room where I have them or other issues…

I have 3 RGB Yeelights and 1 Yeelight LED Strip. They work almost perfectly well. However the lights goes to “unavailable” state now and then which sometimes causes automations to fail turning on (or off) a light… Anybody know a fix? Im running Hass.io and have updated Yeelights to latest firmware.

When ‘unavailable’ check if they are reachable via the phone app. This should tell you if it is an issue with Hass or an issue with your wifi connection.

Ok, it seems to be no problem via the app. If You look at the “history” of your lights, do they ever become unavailable?

Only when they lose power (switched off manually) or there is a wifi issue.