Help with automation with media output

Hey, I’m currently building an automation that should play a text message on my Sonos speakers. It’s working pretty well so far.
However, I’m stuck on two points:
a) I’d like to set the speaker volume to a specific level so I don’t get startled. But after the message, I want it to return to the previous volume. What’s the easiest way to do that?
b) If I’m already listening to music when the message plays, the music doesn’t resume afterwards. I’m also missing the right approach to get the music to continue playing after the message.

Can anyone help me out?

That is normal for Home Assistant.

Hey, thanks.
Does that normally mean it’s not possible to restart the music?

Check out music assistant I believe it can do what you want. I am sure someone with more knowledge will confirm if I am right or wrong.

The Sonos integration as an action to create a snapshot. Do that before sending your text message, and restore it afterwards.