Toogle two lights with one switch

I have two lights walking into the basement. One wall mounted light half way down the stairs and another one at the ceiling when you come down the stairs.
Physically each of the lights is controlled with separate wall switches.
The light at the stairs is controlled by a switch either at the top or the bottom of the staircase. The light in the basement can only be controlled from a switch in the basement.

Now I have installed a Shelly 2.5 in the basement two control the two lights. The staircase lightswitches are running in detached mode and I am trying to get the following behaviour implemented:
Short press: Toggle the staircase light and toggle the basement light, if it was in the same previous state (i.e. if both lights are initially off, they should both be switched on with one button press, but if the basement light is already on, I do not want to switch it off with this action)
Long press: Toggle the basement light (this way I can turn off the basement light standing at the top of the stairs.

My current implementation is as follows:

- alias: Light - Downwards Staircase Lightswitch
  id: 'Light_downwards_staircase_lightswitch'
  trigger:
    platform: event
    event_type: shelly.click
    event_data:
      device: shellyswitch25-CAFEAFFE #Shelly 2.5 Flur UG
      channel: 2 #Channel 2=Staircase
  mode: restart
  max_exceeded: silent

  action:
  - variables:
      trigger_action: '{{ trigger.event.data.click_type }}'
  - choose:
    - conditions:
      - '{{ trigger_action == "long" }}'
      # Toggle Basement Corridor Lights from Staircase Switch
      sequence:
        - service: light.toggle
          entity_id: light.corridor_basement
    default: # '{{ trigger_action == "single" }}'
      # Toggle Downwards Staircase Light
      # Shelly is in detached mode to not switch power, but control the staircase lighting via Zigbee instead
      - service: light.toggle
        entity_id: light.staircase_down
      - condition: template
        value_template: "{{ states('light.corridor_basement') != states('light.staircase_down') }}"
      - service: light.toggle
        entity_id: light.corridor_basement

It does work, but not everytime. I assume it comes down to timing. The conditional evaluation may run just before the staircase light is toggled therefore being a 50/50 chance, that the condition is evaluating the wrong state.
Is it possible to run the condition to toggle the basement light before performing the default toggling of the staircase light?
Can I put a further choose level within the default action?

I guess optionally I could insert a little delay, but ideally the lights should be pretty much synced.

I turn on/off all my basement lights from my stair well switch

- id: '1630948539368'
  alias: Bar Lights - Turn on and off based on stairwell light.
  description: Turn on and off all the lights in the bar area
  trigger:
  - platform: state
    entity_id: switch.bar_stairwell
    from: 'off'
    to: 'on'
  - platform: state
    entity_id: switch.bar_stairwell
    from: 'on'
    to: 'off'
  condition: []
  action:
  - choose:
    - conditions:
      - condition: state
        entity_id: switch.bar_stairwell
        state: 'on'
      sequence:
      - service: switch.turn_on
        target:
          entity_id:
          - switch.bar_can_lights
          - switch.bar_pool_table_light
          - switch.bar_rope_lights
          - switch.bar_hall_to_media
          - switch.bar_landing
      - service: light.turn_on
        target:
          entity_id:
          - light.bar_pendant_light
          - light.bar_back_bar_cans
        data:
          brightness_pct: 50
    - conditions:
      - condition: state
        entity_id: switch.bar_stairwell
        state: 'off'
      sequence:
      - service: switch.turn_off
        target:
          entity_id:
          - switch.bar_can_lights
          - switch.bar_pool_table_light
          - switch.bar_rope_lights
          - switch.bar_hall_to_media
          - switch.bar_landing
      - service: light.turn_off
        target:
          entity_id:
          - light.bar_back_bar_cans
          - light.bar_pendant_light
    default: []
  mode: single

That is also one way to do it. I however have a momentary switch and therefore use the toggle command.
I suppose one way to realizing it this way is to let the switch toggle a helper boolean, which again triggers an automation that depending on the state of the helper boolean turns the lights on/off. But I have the feeling it should also be possible with just the one automation…

I have found a solution that works without delaying the second action and both lights toggle simultaneously, reliable and instantly with the button press.

action:
  - variables:
      trigger_action: '{{ trigger.event.data.click_type }}'
  - choose:
    - conditions:
      - '{{ trigger_action == "long" }}'
      # Toggle Basement Corridor Lights from Staircase Switch
      sequence:
        - service: light.toggle
          entity_id: light.corridor_basement
    default: # '{{ trigger_action == "single" }}'
      # Toggle Downwards Staircase Light together with Basement Corridor Lights
      - choose:
        - conditions:
          - condition: template
            value_template: "{{ states('light.corridor_basement') == states('light.staircase_down') }}"
          sequence: 
          - service: light.toggle
            entity_id: light.corridor_basement
        default: []
      # Shelly is in detached mode to not switch power, but control the staircase lighting via Zigbee instead  
      - service: light.toggle
        entity_id: light.staircase_down