I have the following actions in an automation:
action:
- service: input_boolean.turn_on
entity_id:
- input_boolean.radio_on
- input_boolean.radio_play
- service: media_player.volume_set
data_template:
entity_id: media_player.salotto_audio
volume_level: 0.60
- service: media_player.play_media
data_template:
entity_id: media_player.salotto_audio
media_content_id: >
{{ ["http://icecast.unitedradio.it/Virgin.mp3",
"http://stream-uk1.radioparadise.com/mp3-192",
"http://8.38.78.173:8093/;mp3",
"http://8.38.78.173:8226/;mp3",
"http://listen.shoutcast.com/Classic-RockFlorida",
"http://broadcast.infomaniak.net/tsfjazz-high.mp3",
"http://tx.sharp-stream.com/icecast.php?i=jazzfmmobile.mp3",
"http://peridot.streamguys.com:7010/bblive-sgplayer",
"http://stream1.rds.it:8000/rds64k",
"http://edge.radiomontecarlo.net/MC2.mp3",
"http://shoutcast.rtl.it:3020/stream/1/",
"http://soulradio04.live-streams.nl/soultunmp3"] | random }}
media_content_type: 'audio/mp4'
And i’d like to improve it adding a notification with the name of the radio randomly chosen, but i do not know (due to my HA knowledge) where to begin to do this…
Any help?