I just started to get known with Home Assistant. Based on the comments I found I tried to replicate the built-in Yeelight scene “Sunset”. My only problem is, action: off is not accepted in the config file, although it was written between the options (together with stay and recover). Can someone help me, what did I wrong?
- name: 'Sunset'
flow_params:
count: 1
action: off <-- here I can not have this value
transitions:
- TemperatureTransition: [2700, 50, 10]
- TemperatureTransition: [1700, 180000, 5]
- RGBTransition: [255, 77, 0, 420000, 1]
As this transition is used to go to bed, it would be nice to turn off the lamp. I guess it would be possible to add an action to switch off the lamp after the effect ends, but I would like to know why the off action is not working in my case.
that said, there is a post further up suggesting that off doesn’t work (Wake up with Yeelight), but that was more because actions were not supported (@Michal_Ciemiega )
Do you get any errors in the log?
Looking at github, Action: off does seem to be there.
Official documentation also lists “off” as an option, despite of this, it is not working. More precisely, when I try to save the configuration.yaml, it is not allowed as the value is not allowed. So basically there is no error message as I’m not allowed to use this value.
2020-04-16 09:37:43 ERROR (MainThread) [homeassistant.config] Invalid config for [yeelight]: not a valid value for dictionary value @ data['yeelight']['custom_effects'][3]['flow_params']['action']. Got False. (See /home/homeassistant/.homeassistant/configuration.yaml, line 235). Please check the docs at https://www.home-assistant.io/integrations/yeelight
2020-04-16 09:37:43 ERROR (MainThread) [homeassistant.setup] Setup failed for yeelight: Invalid config.
Hello!
I have been able to create the effect as you suggested and it works great. But the transition from off to the first red color is too quick (and bright) so that change makes me wakes up instantly (in not a too good humor).
I have been looking for solutions to this and the only thing I have found that works is this:
Do you think that something similar could be got through Home Assistant?
What do you think @Michal_Ciemiega? It looks like you are comfortable with the Yeelight source code
I’m not sure if this is still a question, but I found a link, where the original Yeelight transitions are listed. I tried Sunset and Sunrise, they match the one in Xiaomi Home/Yeelight app.
Maybe this one could be useful to understand the above:
This sounds pretty awesome. Could you pls point me to a side explaining how I can integrate that into my Hass?
edit: I guess it is already part of the current Hass version?