Light transition interruption

Hello, this is a topic which has been discussed here several times so far, but I have not found a solution.

Currently, the setup is quite simple. Home Assistant, Electrolama zzh!, Rpi4, ZHA integration. For simplification, I have one IKEA Tradfri Bulb with the puck controller (the 5 button one). For the controller, I am using the ControllerX made for AppDeamon.

The problem is: I have an automation that starts at a certain time of the day. It turns on the light on the lowest brightness setting and the goal is to gradually increase the brigtness. Currently, the code looks like this:

  action:
  - service: light.turn_on
    data:
      entity_id: light.ikea_tradfri_e27_ws_opal_1000_lm_level_light_color_on_off
      brightness: 1
      color_temp: 454
  - service: light.turn_on
    data:
      entity_id: light.ikea_tradfri_e27_ws_opal_1000_lm_level_light_color_on_off
      transition: 300
      brightness: 120
      color_temp: 250

The second part is problematic. The light starts just fine on the lowest brightness setting, but that’s where some wierd behaviour starts. Sometimes it works as it should, but most of the time the bulb starts and begins the transition, but it is impossible to turn the light off. What’s more, the current status of the bulb (brightness, temperature) does not correspond with what is displayed in Home Assistant (HA shows the bulb at 120 brightness as set, but the light itself starts from 1).

From my humble testing, I believe this has something to do with the transition parameter - HA send the transition command to the bulb and it seems the bulb does what it is told. The problem is that I can’t controll the bulb during the transition whatsoever and the only possibility is to turn off the electricity switch itself.

If anyone has any insight or workaround, I would greatly appreciate it.

This has previously been explained as a problem with the hardware. There is no command exposed to home assistant to interrupt the transition once started. Some official apps can do this but it is not part of the API home assistant has access to.

The only solution is to script a transition in homeassistant yourself.