i would like to play some audio books for my kids to fall asleep to. Most of these audio are in short mp3. I’m able to get it to play one but i can’t seem to have it continue to play the next few automatically. below I have a demo showing two books, but i would like to have a list and possibly have it play in order. Currently it only plays the first one and then it stops.
Thank you for taking the time and helping a noob like myself.
here is my code.
audiobook:
alias: AudioBooks
sequence:
- service: media_player.volume_set
entity_id:
- media_player.1_speaker_speaker
- media_player.2_speaker_speaker
data_template:
volume_level: >
{% if now().strftime("%H")|int > 6 and now().strftime("%H")|int < 12%}
0.40
{% elif now().strftime("%H")|int > 12 and now().strftime("%H")|int < 19%}
0.70
{% else %}
0.40
{% endif %}
- service: media_player.play_media
data_template:
entity_id:
- media_player.1_speaker_speaker
- media_player.2_speaker_speaker
media_content_id: >
https://yyy.www.org:8123/local/books/book_name_01.m4a
https://yyy.www.org:8123/local/books/book_name_02.m4a
media_content_type: audio/mp4