Time Delay to synchronize sounds to lights

The following action is triggered when the conditions are right. It plays an audio file to announce the shutdown. At exactly 2 seconds and 890 milliseconds into the audio file, there is a sound that represents the actual shutdown event, which is a light turning off. My idea was to synchronize the switch.turn_off event with the audio file at the exact point I need it to be.

After removing the delay, it still seems that the switch action waits until the audio file has completed. I’m wondering if there’s a way to overlap the two events so the lights are triggered to turn off as the audio file reaches a certain point on the timeline.

action:
    - service: shell_command.initiating_shutdown_sequence
    - delay:
        milliseconds: 2890
    - service: switch.turn_off
      entity_id: switch.entertainment_center

Woohoo! Never mind, I figured out how to do it.

Rather than having the actions in the same automation, I’ve split the automation into two separate routines, one for the light, one for the audio file, but I did put them in separate YAML files. I suspect I could just have them both in the same file each with their own alias, correct?