Effects in service light.turn_on

I have an automation that uses the service light.turn_on to control an LED bulb with various options od color temp, color map brightness, and so forth. Everything has been working for months without issue.

Last night I discovered that there are “effects” I can set within home-assistant. When I set the “candle” effect in home-assistant it works fine. When I try to do it in my automation it does not work. The rest of the automation works by setting the desired color temp and brightness but the candle effect is not applied. I can still apply it manually in home-assistant.

I have reloaded automations and made a dramatic change to brightness to verify that my changes took effect and they did, but no candle.

What am I missing here?

Aren’t the effects Scenes?
So you need to activate a scene instead?

1 Like

If you are able to call it manually via Home assistant then you are able to call it via an automation.

This is assuming the commands are correct and you are calling either a single light entity and or a group of lights that ALL have the effect capability as not all do.

All our bulbs are hue bulbs and some have for example the candle effect capability but some dont, if I call a group of bulbs that contains a single bulb without the capability then the effect will not action on any of the bulbs.

service: light.turn_on
data:
  effect: candle
target:
  entity_id: light.bed_room_1

Try comparing the manual call yaml to your automation yaml or post the automations yaml so we can see.

Here is the entire automation

Turn the TV lights on and set color

  • alias: LR TV lights on
    trigger:
    • platform: state
      entity_id: light.lr_mauka
      from: “unavailable”
      to: “on”
      condition:
    • condition: state
      entity_id: input_boolean.vacation_mode
      state: ‘off’
      action:
    • delay:
      seconds: 5
    • service: light.turn_on
      data:
      entity_id: light.lr_tv_left
      brightness_pct: 30
      color_temp: 433
      effect: candle
    • service: light.turn_on
      data:
      entity_id: light.lr_tv_right
      brightness_pct: 30
      color_temp: 433
      effect: candle
    • service: light.turn_on
      data:
      entity_id: light.lr_mauka
      brightness_pct: 30
      color_temp: 433
      effect: candle

Please ignore the trigger about going from unavailable to available. It is temporary and necessary because these lights are on a switch in a box that is too full to install a Leviton switch. I will correct this at some point but just accept that the unavailable to available trigger works and everything is fine except that candle effect does not get set.

Vacation_mode is a global boolean I use to disable a lot of automations when I am not home. It i snot relevent here.

The dimming and color setting works. The effect setting is the only thing that fails. No errors, no notices, just not happening

Maybe that is my problem but th HA documentation says I can set an effect through the service.

You can’t call candle effect and colour_temp at the same time.

Ok, so how do I fix?

And frankly, why is that not in the documentation?

Because nobody has added it there.

If you click here:

then you should be able to add it.

There is a lot of service calls and settings that can and will conflict.
Brightness and brightness_pct for example will conflict.
If every variation of each service call should be documented, and every service call that does not work then we will have massive document pages.
People generally don’t read them as they are and having them multiple times longer will probably not help.

I think there should be a note in your log that it failed.

Just call light turn on without selecting colour_temp if you wish to use candle effect.

Because quite frankly there are a lot of variations, lots of different brands of bulbs with varying capabilities, like @Hellis81 states for example “Brightness and brightness_pct for example will conflict.”

Also when you stop and think about it a candle effect randomly changes the colour of the bulb to mimic a candle, so calling a colour at the same clearly in this case doesnt work!

Thanks for the help. Commenting out the color_temp in the automation fixed it. I thought the candle effect was just the flickering. I did not expect it to impact the color. It seems like I should be able to have a flickering green candle if I want. I guess not.

My lights are a little whiter in candle mode than I would like but I guess that is a hardware issue, or at least software in the hardware not HA. I was also getting confused by the fact that HA reported the color temp as the value I set it at even in candle mode. I guess the state it is reporting is the value before the mode changed.

In any case, I appreciate the help.