Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106533

Get randrom value which not duplicate with the value in previous random list

$
0
0

Hi, every one. As everyone know that we can get random value with construction as example below

{{["media_player.video_url_1","media_player.video_url_2", "media_player.video_url_3"] | random}}

I have script with repeat to play random youtube audio with a list of url links.
The problem is that the random get too much same value urls when play next song so that I have to hear that song repeatly.
So Anyone have any idea to solve that problem. Thanks

For example:

I have list with 10 songs: audio_1…audio_10
I’ll random it in the list and get the audio_3. At the next song, the audio_3 will be remove from the list and random the others one. And continue repeat to the last ones.

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 106533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>