Stream Twitch to chromecast using a script?

Hello,

Does anybody have a working solution for streaming twitch live stream automatically to chromecast?

This used to work, but it does not load the stream anymore:

twitch:
  alias: Start twitch
  sequence:
    - service: switch.turn_on
      entity_id: switch.televisio
    - service: media_extractor.play_media
      data:
        entity_id: media_player.kd75
        media_content_id: 'https://www.twitch.tv/NameOfTheStreamer'
        media_content_type: 'video'

Thanks!

I found a workaround for this problem.

I can use Android TV component to fire an ADB command to my Sony android TV:

Example script:

> twitch:
>   alias: Start twitch
>   sequence:
>     - service: switch.turn_on
>       entity_id: switch.televisio
>     - delay: '00:00:05'      
>     - service: androidtv.adb_command
>       data:
>         entity_id: media_player.android_tv_1
>         command: am start -a android.intent.action.VIEW -d twitch://stream/StreamerNAME
1 Like