Hello!
With the addition of custom effects to yeelight, I guess it should be possible to use it like a wakeup light (slowly dimming from lowest brightness to full over a couple of minutes)
Any idea on how to achieve that?
Hello!
With the addition of custom effects to yeelight, I guess it should be possible to use it like a wakeup light (slowly dimming from lowest brightness to full over a couple of minutes)
Any idea on how to achieve that?
Scene “Sunrise” for Yeelight RGB.
Full brightness (color temp 2700K) after 15 minutes.
custom_effects:
- name: 'Sunrise'
flow_params:
count: 1
transitions:
- RGBTransition: [255, 77, 0, 50, 1]
- TemperatureTransition: [1700, 360000, 10]
- TemperatureTransition: [2700, 540000, 100]
Works really good but I have a problem… I cant define “action” which tells the bulb what to do after the flow has stopped. Played a bit around with Sunrise/Sunset and it always uses flow.actions.recover which sets the bulb to its last state before the scene, in my case it was 1% red. I’d like it to to use flow.action.stay to keep the last state of the flow. Same for Sunset. After the the flow finishes, the bulb just goes back to full brightness. You cant define flow.actions.off to turn the bulb off after sunset finishes.
Hi!
It’s clear to me, how to write a transition…
but… how can i activate it?
i couldn’t figure it out…
thanks!
You can create a scene. And activate it in automation.
scene:
- name: Sunrise
entities:
light.yeelight:
state: on
effect: Sunrise
Or use light.turn_on service.
I’ve missed flow.actions param, when writing support for custom_effects. I will take at look at adding it.
EDIT: Made PR here: https://github.com/home-assistant/home-assistant/pull/21195
EDIT2: Looks like its merged, also docs, so lets hope it will be in newest version
Thanks for kind words. I’m also happy with how they are working. I was missing that scenes so much. Now I hope more people will create and share cool custom effects, so I can just copy them
Great, it works!
Thanks for your help, i love this feature!
Has this released in 0.89.2? Because although the configuration accepts action: stay it doesn’t seem to work in practice
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
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
Great it works now, thanks for sharing
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