Ikea TRADFRI Transition When Turning On

I am trying to configure transitions to fade in lights. I have a mix of Philips Hue bulbs and Ikea TRADFRI bulbs.

I have been able to get transition working with the Philips Hue bulbs for light.turn_on, and with both Philips Hue and Ikea TRADFRI bulbs for light.turn_off.

I have not been able to get transitions working with Ikea TRADFRI with the light.turn_on service.

My configuration for the script is

  alias: 'Switch: Bathroom Circadian Lighting CT - On (All) TEST SECONDARY'
  - service: light.turn_on
      entity_id: light.bathroom_secondary
      transition: 3
      brightness: >
        {% set brightness = state_attr('switch.circadian_lighting_bathroom_ct','brightness') %} 
        {% set bri = ((((brightness|float) * 254) / 100)|int) %}
        {{ bri }}
      color_temp: >
        {% set colortemp = state_attr('sensor.circadian_values', 'colortemp')%}  
        {% set ct = ((1000000 / (colortemp|float))|int) %}  
        {{ ct }}
  mode: single

The above results in the Ikea bulb turning on immediately without any transition. When performing the light.turn_on service all through the Developer console tools, transition seems to work with the Ikea bulbs.

Does anyone have an idea why transitions might not be working for me with the Ikea bulbs?

I was able to get transitions working eventually by performing two light.turn_on calls, where the first sets brightness to 1, and then the second call sets a transition value to get to desired brightness and color.

My config looks like this:

- service: light.turn_on
    entity_id: light.bathroom_secondary
    brightness: 1
    color_temp: "{{ state_attr('sensor.lighting_mode','ct_value_adjusted') }}"
- service: light.turn_on
    entity_id: light.bathroom
    color_temp: "{{ state_attr('sensor.lighting_mode','ct_value_adjusted') }}"
    brightness: "{{ state_attr('sensor.lighting_mode','brightness_5_min') }}"
    transition: 1

There is a little bit of a jump when the Ikea lights turn on, compared to the Philips Hue lights, presumably because the minimum brightness for Ikea TRADFRI lights are much higher than the Hue lights.

1 Like