Offer option to loop/repeat an audio file on the media_player.play_media service

so I’ll just say that I agree that the media browser for music is kind of useless since it doesn’t play an entire album, after one song it just stops. It’s a shame since I would use this all the time because it’s just so much easier to select a song from home assistant and not have to go to my plex server’s IP. I always have homeassistant open so this would be a nice feature. I do love the updates to it though.

@carlos.vroque did you happen to create a blueprint for this? I can’t seem to get my sciprt repeating/looping the mp3 file.

Hi All,

Is this feature available yet or at least a work around? ta

Hi Carlos, Cheers for this! it definitely worked on mp3, but I’m trying to tinker around to get it working to play a playlist. plex playlist to be exact, but it simple doesn’t want to cooperate. I managed to get it working on plex media /single mp3 media.

Any advise? Thanks

This problem is abandoned.

More users need to vote to make this higher in the development list

1 Like

This has been an on-going issue since 2020 and there are still no known solution nor updates from the developers. I really want to have this done too and have been monitoring this thread since last year but as of now, still no cigar.

4 Likes

Just posting to keep the thread alive, but I don’t suspect we’ll ever see movement on this issue.

4 Likes

We will, keep positive thinking! Thanks for bumping!

3 Likes

perhaps we need to submite this function to the " The month of ‘What the Heck?!’ 2023" https://www.home-assistant.io/blog/2022/09/30/the-month-of-what-the-heck/

1 Like

So there is still no possibility to repeat/loop an audio file on a Google Mini? Is there a workaround?

I had a similar situation as depicted in 1st post, Sonos speakers supposed to play ambient sounds in a loop.

Simplest workaround solution was an automation that would play that sound file as soon as the media player’s status was not ‘playing’ for more than 3 seconds.

Using Home Assistant to create a D&D Dashboard and would love the ability to loop audio

Bump for up vote! I need thing to loop/repeat

voted for repeat feature as well.

Also adding voice to throng - this seems such a bad, missing feature for ChromeCast devices, making for appallingly inefficient system use.

Hi all,

I believe I came across this thread for the same reason many have… Sleep!! and wanting to listen to white noise while doing it.

Previously we were using a voice command for “play the sound of rain” on our Google Home, which would run all night and we slept quite well. But I wanted to improve 2 things, not needing an internet connection to sleep well and automating it in home assistant.

This thread has some answers with scripting but nothing GUI and out of the box. So I had a play and it turns out it’s not only possible but relatively easy!!

Step one: Source a audio file to play on loop while you sleep. I’m just using a .mp3 of rain sounds that runs for 1 hour.

Step two: Save the file to your local media file in home assistant. I found the file was too big to update via the web UI so I install the Samba share add on which lets you access the folders via windows explorer.

Step three: Create a new automation/edit your existing bedtime automation that will be used to cast the audio to your fav bedside speaker.

Step four: Once your trigger and conditions are set how you’d like them (we just use a button press on the bedside table for now), click “Add Action” and choose “Repeat”.

Step five: I used “While” and set the conditions to a fixed time between 8pm and 9am. This means the white noise will turn off in the morning once I’m up.

Step six: INSIDE the repeat action add an action of “Play Media”. Select your speaker and the audio file we uploaded in step two.

Step seven: Also INSIDE the repeat action add a second action of “Wait for time to pass (delay)” and set the time to a few seconds shorter than your audio file.

This should play the audio file and then wait for almost the full length of the file then repeat and play the file again and reset the timer.

I have been running this for a couple of nights now and it’s working great.

Note I’m running:
Home Assistant 2023.3.4
Supervisor 2023.03.1
Operating System 9.5
Frontend 20230309.0 - latest

Hopefully this helps some people get a good nights sleep!

6 Likes

I’d like to see this too. I want a loop to play tropical night frog and bug sounds on the Google Mini in my tiki bar.

1 Like

Here just to write that I also wish this existed, for the very same reason most of you… white noise.

1 Like

Also looking for this feature. Would be wonderful for white noise.