Still trying to get a loop to work. Use case is, I want the device closest to me to play a white noise ogg or mp3. I can achieve this with a 12 hour file, but it's a huge file 400mb+ so if there's a network issue it starts stuttering and fails. I have found a 60 minute file that's 50mb and would like to loop it, so that if there's an issue, it can just fail that play and go to the next in the loop. Challenge is the way I have it set up, it starts playing loops a second later through all my loops except for the last one, then plays the full duration. So in essence it stutters, then plays it only once through.
This is set as a script so I can use it on a push button on my dashboard, but also have the ability to call it through an automation that does other events.
I'm doing something wrong, but me and GPT can't figure out what it is:
alias: Play White Noise Loop Redux
sequence:
- repeat:
count: 5
sequence:
- target:
entity_id: media_player.m5stack_atom_echo_fddf94_m5stack_atom_echo_fddf94
data:
media_content_id: >-
media-source://media_source/local/Unraid/media/music/Sleep/white-noise-8117.mp3
media_content_type: audio/mpeg
action: media_player.play_media
- delay:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
Any thoughts on this would be greatly appreciate thanks in advance!