Implement Yeelight modes like "Candle Flicker"

I just added some more Yeelight Wifi Color Bulbs and saw some new scenes/models in the yeelight app.

One of them is called “Candle Flicker” which will make the bulb slowly brighter and warmer, like a candle.

I would love to trigger this from home assistant.

Also interested in it.

+1

i need this, too

I’ve made PR with support for allowing custom effects. You can test it via custom_component.

EDIT: looks like its merged, so it should be in official HA starting 0.87

2 Likes

Awesome!
For now the only thing I could accive is to write out the transitions, but failed to call it directly like the fire flicker - tried it with flow, custom_effects, transitions, effects_config, effect/s. Or is’nt it thourght to work this way?

You can’t call the standard Yeelight app effects directly, you have to re-create them using the transitions

The fire Flickr is already pre recreated from the docks.
Service and entety is clear. But I don’t come on the data I have to pass to activate the pre defined Flow.

There is an example in the docs of how to re-create the candle flicker, yes, but you can’t call a service to activate it as a pre-defined flow as far as I am aware. That’s the point of the new custom_effects transitions. So if you want the candle flicker, simple re-create that effect using transitions exactly as is shown in the docs

I wanted to ask bout it because were defining a custom effect in the light configuration already.

in means of consistency the service should be something like

- service: light.yeelight_start_flow
  data:
    entity_id: light.yeelight
    flow: 'fire_flickr'

just like we call a colorloop or random effect

Instead of

- service: light.yeelight_start_flow
  data:
    entity_id: light.yeelight
    transitions:
      - TemperatureTransition: [1900, 1000, 80]
      - TemperatureTransition: [1900, 2000, 60]
      - SleepTransition:       [1000]

image
(I feel like a scumbag for asking, therefore the hat)

Sorry, I had gone off on a tangent :man_facepalming: You should be able to select the newly added custom_effect for a light like you do for the other effects. Is your Fire Flicker showing up in the drop-down list when a light is on?

The service call will be:

  - service: light.turn_on
    data:
      entity_id: light.your_light
      effect: fire_flicker
1 Like

Aaaah! There youre hidden! Thanks so much - Tryed effect, But in the wrong service. The docks doesnt point this out (yet)
Also a nope on the dropdown. Meight be because of the version of the bulb (ct2)

Technically the docs do day how to call the service for an effect, but I guess it’s not explicit that the custom_effects are called as per the standard ones.

So it’s all working?

Is it possible to define custom effects using automatic config for a light? Or do I have to do a manual config the light to use the custom_effects? The example here https://www.home-assistant.io/components/light.yeelight/ is for manual config.

I tried the following in configuration.yaml, but it’s not working:

light:

  • platform: yeelight
    devices:
    light.yeelight_bedside_7c50eb2868ba
    custom_effects:
    • name: ‘Fire Flicker’
      flow_params:
      count: 0
      transitions:
      - TemperatureTransition: [1900, 1000, 80]
      - TemperatureTransition: [1900, 2000, 60]
      - SleepTransition: [1000]

But this example it’s very bad, nothing close to Yeelight App.

hello everybody,someone with a yeelight custom_effect that looks like the police effect that comes by default.thanks a lot

Excuse me. I couldn’t get your point.

I need turn on a light with police effect with a automation, but I want that if I turn on it manually be white, I think I need define a custom_effects like this:

yeelight:
  devices:
    192.168.1.25:
      name: Living Room
  custom_effects:
    - name: 'Fire Flicker'
      flow_params:
        count: 0
        transitions:
          - TemperatureTransition: [1900, 1000, 80]
          - TemperatureTransition: [1900, 2000, 60]
          - SleepTransition:       [1000]

Maybe I’m wrong, sorry