Wake up with Yeelight

Great, it works!
Thanks for your help, i love this feature! :blush:

Has this released in 0.89.2? Because although the configuration accepts action: stay it doesn’t seem to work in practice :thinking:

Hi

Yes its merged since 0.89.0. I’ve just tested it and seems to work fine. Whats happening ? Maybe you are using count 0, which is default, then flow never ends I think, maybe that’s why ? Also here is more info about it https://yeelight.readthedocs.io/en/stable/flow.html#usage

So this is what I have:

 - name: 'Sunrise'
   flow_params:
     count: 1
     action: stay
     transitions:
       - RGBTransition: [255, 77, 0, 50, 1]
       - TemperatureTransition: [1700, 3000, 10]
       - TemperatureTransition: [6500, 3000, 100]

I set the timings to 3000ms just to see if it works. I get dim red -> warm light -> turns off; followed by dim cool light -> bright cool light -> returns to whatever light was on before. Do I need a sleep transition or something?

You are right. It’s only working via service call now. When used in declared effect, it gets ignored. I’ve made PR with fix for that. https://github.com/home-assistant/home-assistant/pull/22159

1 Like

Works great now by the way, thanks a lot!

yeelight:
devices:
  10.1.1.29:
    name: Bedroom
    model: color2
custom_effects:
 - name: 'Sunrise'
   flow_params:
     count: 1
     action: stay
     transitions:
       - RGBTransition: [255, 0, 0, 50, 1]
       - TemperatureTransition: [1700, 180000, 10]
       - TemperatureTransition: [2700, 180000, 11]
       - TemperatureTransition: [3700, 180000, 12]
       - TemperatureTransition: [4700, 180000, 13]
       - TemperatureTransition: [6500, 180000, 100]'

And then automated as well:

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

Great it works now, thanks for sharing :smiley:

I know this is a long time later, but I just tried using this custom effect… it isn’t working for me. The effect shows up and I can select it, the light changes to a dark orange (expected) but then after a while (time seems to vary) it jumps to white light and full brightness. Not sure if this is a HA 0.96.1 problem or not because I only just tried it after updating. Also, the first Yeelight that I tried this on seems to be permanently broken now… it wont change away from full white and if I try to change it too many times it goes offline and needs a power cycle to come back, albeit back to full white… Is this custom effect still working for you?

This custom effect works for me without problems on 0.96.1

There is something quirky either in the bulb itself, or the integration.

I have the following as an automation to turn a light on 45 minutes before sunset:

action:
    service: light.turn_on
    data:
      entity_id: light.yl_study_cb1
      transition: 60
      brightness: 220
      color_temp: 247

Which works. Except the light comes on slowly over a few seconds to about 50% brightness then jumps to 220 in one go.

bulb is running 1.4.2_0061 - just noticed 0075 is available.

sigh - dont upgrade - 1.4.2_0075 is trash. - Yeelight LED Bulb No "Fade In and Out" effect after update to 1.4.2_0075 - #62,来自 Lucamag - Yeelight Forum - loads of complaints. transitions are totally screwed.

I think this is the issue that music mode is supposed to fix. If you send more than 60 updates/minute, the bulb disconnects… Yeelight - Home Assistant

I’ve tried the transition on a couple of bulbs now and it seems to act the same on all which is very strange. Luckily I only upgraded the firmware on one of them before reading your comment about the new firmware being rubbish. Not sure what else to try though, I was really looking forward to this sunrise effect in the mornings

I’ve not tried the transition from EvanJ - I’ll try give it a go tomrrow.

just tested it on the 1.4.2_0075 bulb (with HA 0.95.4), and a faster version of the transition (10000ms/10seconds) - its trash.

light starts as red on ‘lowest brightness’ (eg not very low. lol)
gets brighter for 10 seconds then jumps to white once the temperature transition is called.

I think it is the lack of colour fidelity at low brightness that screws this up.

No matter what I do, there is a ‘jump’ as the brightness crosses a threshold of about 5-10%

@hekm77 - can you check the firmware version of your bulb(s)?

The firmware on my color bulbs (MJDP02YL) is 1.4.2_0070. The color flow is still smooth.

interesting. I still have a bulb with 1.4.2_0061 - will have to try on there.

and its nice. on 1.4.2_0061

so dont upgrade to 1.4.2_0075

1 Like

@sparkydave

I’ve just updated a colour bulb v1 to 1. 4.2.0076 via Singapore server.

Seems to be way better for colour flow, and the initial colour is now red to not a murky orange. so if you have a firmware with crappy transition, try the upgrade.

ok thanks! I’ll give it a try tomorrow when I get a chance. Just to check, are you using the exact transition code from the second post in this thread?

- name: 'Sunrise'
    flow_params:
      count: 1
      action: stay
      transitions:
        - RGBTransition: [255, 0, 0, 50, 1]
        - TemperatureTransition: [1700, 180000, 10]
        - TemperatureTransition: [2700, 180000, 11]
        - TemperatureTransition: [3700, 180000, 12]
        - TemperatureTransition: [4700, 180000, 13]
        - TemperatureTransition: [6500, 180000, 100]
1 Like

Thanks, that’s a fair bit different to what I had so I’m excited to test it out now