Incorrect speech sentence because voice is excecuted after action

Hi there,
I’ve wrote this simple if else condition code in Home Assistant that after it check the variable coming in, it has to reply to me a sentence based on my actual lights state.
I’ve already verified and all code seems to be running correctly in Template Dev Tools page but the current issue is that no matter what it variable state it receive (on or off) it always tell me that:
“lights are already on” or “lights are already off”
After searching to debug the issue, I found this happen because it seems that the Speech voice part, being processed AFTER the action has already turned on or off the lights… So there is no way for me to get the “turning on the lights” or “turning off the lights” sentences.
So, I would to ask you if is there a way to prioritize and force the code to process firstly the SPEECH part before the ACTION part change the state?

# values coming in variables: {{name}} = light group {{state}} = on/off
ChangeLightState:

  speech:
    text: >-
      {% set name2 = name | replace(" ","_") %}
      {% if state == 'on' and is_state(('light.' ~ name2), 'off') %} turning on lights
      {% elif state == 'on' and is_state(('light.' ~ name2), 'on') %} lights are already on
      {% elif state == 'off' and is_state(('light.' ~ name2), 'on') %} turning off lights
      {% elif state == 'off' and is_state(('light.' ~ name2), 'off') %} lights are already off
      {% else %} info debug error {{ state }}
      {% endif %}

  action:
    - service: light.turn_{{ state }}
      target:
        entity_id: light.{{ name | replace(" ","_") }}
    - service: notify.marco   # this just for debug purpose
      data:
        message: >-
          Debug info -- {{ name }} - {{ state }}