DFPlayer Mini & ESP8266 MP3 Playback Queue Help?

I’m using a DFPlayer Mini to play individual MP3 files triggered by automations. For example, if front gate is opened, a door sensor reports it and the DFPlayer Mini plays an MP3 track “The front gate is open.” This work great, but if two automations trigger within a few seconds of each other, the first MP3 playing is interrupted by the second one. I want to use a queue so that each MP3 plays fully before the next one starts, but I can’t figure out how to get the queue to work. Has anyone sucessfully done this and would share the YAML and instructions for it?

Thanks everyone!

Update: I figured it out. I created a Script that monitors the “on” or “off” state of the DFPlayer “playing” entity. When on (and playing an MP3), the script waits until the DFPlayer “playing” entity is set to “off” to play the next MP3. This is more of a traffic control system than a queue. If anyone wants to try this, ask here, and I’ll post the script I wrote and answer any questions you might have.