Incremental Brightness increase doesnt work with ikea tradfri e14

So i wrote this script which should increase the brightness until it is 255. When i run the script nothing happens. Not even an error message. Does anybody has a solution?

alias: increasing_brightness_lightbuld_1
sequence:
  - repeat:
      while:
        - condition: numeric_state
          entity_id: light.led_lampe_1
          attribute: brightness
          below: 255
      sequence:
        - service: light.turn_on
          data_template:
            entity_id: light.led_lampe_1
            transition: '60'
            brightness: >
              {% set n = states.light.led_lampe_1.attributes.brightness + 25 %}
              {% if n > 255 %}
                255
              {% else %}
                {{ n }}
              {% endif %}
mode: single
icon: 'hass:lightbulb'

Why don’t you just set a high transition value to turn the light on? Should do the same, although I don’t know if that’s supported.

When you run the script, does it turn on the light at all?

1 Like

So thx for the response. Your solution with the high transition value worked for me. And no the script does not turn on the lights. for that i use another script in which i now added the transition.

1 Like