I have setup the Sonos integration and I want to listen to the news “tagesschau in 100 sekunden” , a python script gets the link to the newest mp4 file of that news show and sends it to the home assistant via a mqtt sensor.
Problem: my automation that starts the playback of that file does stop after a few seconds, it sounds like the stream just breaks apart.
File url: https://download.media.tagesschau.de/video/2020/1129/TV-20201129-1929-1600.webxl.h264.mp4
Config:
- id: '17'
alias: Tagesschau in bathroom
description: ''
trigger:
- entity_id: input_boolean.tagesschau_bathroom
platform: state
to: 'on'
action:
- service: input_boolean.turn_off
entity_id: input_boolean.tagesschau_bathroom
- service: media_player.clear_playlist
entity_id: media_player.badezimmer
- service: media_player.play_media
entity_id: media_player.badezimmer
data_template:
entity_id: media_player.badezimmer
media_content_id: "https://{{ states('sensor.tagesschau') }}"
media_content_type: music
- service: media_player.volume_set
entity_id: media_player.badezimmer
data:
entity_id: media_player.badezimmer
volume_level: 0.12
mode: single
It works just fine with other music like from spotfy. Any suggestions what the issue is with this particular file?