Automation can't play more than one media file inside a repeat action

If I create an automation that plays two media files as its action (one local and one google text to speech), with a trigger in between them to wait for the speaker to become idle before playing the second one, it works great. Plays both files just right.

However, if I move all of that inside of a repeat action with, say, a count of two, it plays the first file twice, then the second file once. I tried adding a delay after the first file but that didn’t help.

Have I found a bug? How can I make it repeat both files in order?

Please provide the YAML code, that will help us help you

My apologies. I erased the automation after writing this, and upon rebuilding it to respond to your request, it seems to work properly now. I must have had some kind of dumb error in the original automation. Please close this topic.