Yeelight.set_mode rgb, how to set parameters?

Hi,
I am trying to get an automation work using the rgb mode.

This it was works fine with the automation:

  action:
    - service: yeelight.set_mode
      data:
        entity_id: light.officeceiling
        mode: moonlight

BUT I would like to use the rgb mode to specify and individual setting and eventually use the transition function to make a wake up light. I could not find an example showing where to actually put the values for the colors. I tried this:

  action:
    - service: yeelight.set_mode
      data:
        entity_id: light.officeceiling
        mode: rgb
        rgb_color: [255,153,0]
        brightness: 2

This does not work. Can someone correct it or show an example of how to put in the parameters?

Thank you

1 Like
  - service: light.turn_on
    data:
      entity_id: light.officeceiling
      brightness: 2
      rgb_color: [255,153,0]

for info: brightness value is also an integer between 0-255. 0 = off, 1 = minimum brightness, 255 = maximum brightness. Your setting ā€˜2ā€™ is almost the minimum brightness.

1 Like

Thanks, that works!
I realize that it is almost the minimum. However, for my purpose as a wake up light, it is much to bright for my liking. I would like to be able to make it as dim as the late if you call the ā€œsunriseā€ scene you can choose in the yeelight app.

The minimum brightness you can chose is brightness: 1 Well, this is one of the drawbacks of Yeelight. Itā€™s cheap solution. It is very good for many situations, but in some color range itā€™s not bright enough while the minimum brightness sometimes can be too bright for other colors. The color vibrance is also questionable. Philips Hue LED strip can be dimmed completely, or it can be very bright and the colors are also amazing. But it costs almost 3x more.

The minimum and maximum brightness is changing with the color. If itā€™s too bright even with minimum setting, try another color as far as possible from white or bright colors. I think the red gives the lowest brightness. It is the best for eyes in complete darkness.

see Wake up with Yeelight - the lowest brightness and colour fidelity are very dependent on the firmwareā€¦

1 Like

I bought a couple of LED strips and they are with the latest firmware according to the topic you linked, so not much I can do here. I donā€™t know if downgrade is possible.

I cant comment on the lightstrips - the main issue is the gen 1 colour bulb. But I wouldnā€™t be surprised if it applies to multiple devices.

Downgrade appears to only be possible by Yeelight staff directly managing your deviceā€¦

I am using it on a yeelight ceiling lamp and have the same problem. Even if I use the sunrise scene from the yeelight app on my android, a jump to maximum brightness occurs after approximatley half of the 15min.

Also I asked in the yeelight forum for the start setting of the sunrise scene and got the answer:

4000K with 1% brightness.

and:

Params of sunrise for rgb devices:
[ā€œcfā€,3,1,ā€œ50,1, 16731392 ,1,360000,2,1700,10,540000,2,2700,100ā€]}

Can someone tell me how I set temperature as I set RGB in this example?

  - service: light.turn_on
    data:
      entity_id: light.officeceiling
      brightness: 2
      rgb_color: [255,153,0]

Thanks!

what firmware is your bulb? and which bulb (colour obviously, v1 or the brighter v2?)

It is not a bulb, it is a lamp. Itā€™s the Yeelight LED Ceiling Light Model No. YLXD01YL
It has a limited colour range (2700K-6500K)
grafik

I ran the sunrise scene from the yeelight app this morning again. 1st: it is weired that it depends on the mode the lamp has been in before. It does not work with any random mode. I had to activate the moonlight scene and only then the sunrise scene started correctly. 2nd: Then it ran fine for 15min and worked as suppoased. Only at the very end it just went to full white brightness, which is very anoying. Still, it would be nice to be able to call the yeelight sunrise scene from a hass.io automation, just as you call the moonlight scene. Or is the moonlight scene you call in hass.io not really the moonlight scene from the yeelight app?

I canā€™t find the current firmware version in the yeelight app. I only see it, if there is an update. Do you know where I can find which version is currently on the (or any yeelight) device?

Ahh - I wondered. This might be a different (but similar issue) then.

For firmware - in the app, go to the device, press the ā€œup arrowā€ and select firmware update - this will show the current firmware).

Canā€™t comment on the hass.io aspect as I dont have it, or this light. Sorry

Thanks for your feedback. It is probably not relevant, but just to note it down, my ceiling light runs at Firmware 1.5.9_0184 at the moment and I am on the German server.

I want to do this too
Activate a yeelight app scene from home assistant

Is it possible???

I did not look into this for a long time since I switched to the automations in the yeeligt app. But in general yes, it is possible. Why I switched was that to my knowledge not all scenes from the app are available in hass.io.

How do you activate a yeelight scene from homeassistant?

Well, it used to work like the example below for me until about 1 year ago. Then with some hass.io update it stopped working. This is why I switched to the yeelight app for anything with scenes. However, I would be interested in trying again. ATM I only use simple light.turn_on commands in my hass.io automations for my yeelight lamps.

- alias: Sunrise Lighting (bedroom)
  id: Sunrise_lighting
  trigger:
  - platform: time
    at: '06:30:00'
  condition:
  - condition: time
    weekday:
    - mon
    - tue
    - thu
    - fri
  action:
  - service: yeelight.set_mode
    entity_id: light.officeceiling
    data:
      mode: moonlight
  - service: light.turn_on
    entity_id: light.officeceiling
    data:
     effect: Sunrise

AFAIK, you canā€™t call a Yeelight scene from HA. You can run a custom effect though, which I believe is what Hackmett is doing aboveā€¦

1 Like

@walaj yes I think that is correct. And the situation atm is that only very few yeeligt scenes are implemented in hass.io as custom effects. Do you agree?

afaik, any scenes shown as custom effects mapping to scenes are purely coincidental.

the default custom effects are listed here - https://yeelight.readthedocs.io/en/stable/yeelight.html#module-yeelight.transitions