Home Assistant Community

Implement Yeelight modes like "Candle Flicker"

#1

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.

0 Likes

#2

Also interested in it.

0 Likes

#3

+1

i need this, too

0 Likes

#4

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

#5

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?

0 Likes

#6

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

0 Likes

#7

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.

0 Likes

#8

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

0 Likes

#9

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)

0 Likes

#10

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

#11

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)

0 Likes

#12

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?

0 Likes

#13

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]
0 Likes

#14

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

0 Likes