Automation does not run second action

Hi

I have this automation that turns on some lights when activated by a motion sensor and turns off the lights again when no motion is detected for 5 minutes, this work. But now I have added some more lights that is turned on by a sensor on my fridge, I want these new lights to turn off the same time as the first once - 5 minutes after motion is detected. But it does not work. The 2 zha lightgroups turns on and the first of them turns off. If i run the action from the Run command in the visual editor it works. There is nothing in the log - or i’m not looking in the right place. The code is as simple as below.

  - conditions:
      - "{{ trigger.to_state.state == 'off' }}"
    sequence:
      - service: light.turn_off
        data: {}
        target:
          entity_id:
            - light.silicon_labs_ezsp_kokken_lys_gruppe
      - service: light.turn_off
        data: {}
        target:
          entity_id: light.silicon_labs_ezsp_kokkenbord_lysgruppe

Take a look in the automation trace. It should show if the step executed or if there was some error with the first service call. Depending on the integration, sometimes a service call like this will report an error, even if the action happened correctly IRL. If this is the case, you can add the continue on error setting to the first action.