Cast youtube stream in samsung TV or chromecast

Hi, im new in home assistant and i’ve faced a few challenges but im willing to learn.
For a few days i’ve been trying to create a script to launch a video in chromecast and create an automation with that in this way

service: media_player.play_media
data:
  media_content_id: '{ "app_name": "youtube", "media_id": "bEVVs9bA9f4"}'
  media_content_type: cast
target:
  entity_id: media_player.dormitorio

i’ve tried to use media extractor aswell but no results. Then i tried to launch the live stream in the samsungTV and the way to achieve it was:

service: media_player.play_media
data:
  media_content_id: https://youtube.com/c/RadioConVos899-oficial/live
  media_content_type: url
target:
  entity_id: media_player.tv_samsung

But using this method opens the web browser and then starts playing.

I would like some help since i’ve been trying with a couple addons from HACS and different stuff from this forum but until now i wasnt able to solve it.

My goal is to launch a youtube livestream (https://youtube.com/c/RadioConVos899-oficial/live) in youtube app in chromecast, Samsung TV or both

Try this using android tv integration through adb

adb shell am start -a android.intent.action.VIEW -d "https://youtube.com/c/RadioConVos899-oficial/live"

It should directly open YouTube app and start that video on your tv

1 Like

i’ve tried out but saddly i dont have an android tv device, it`s a 2016 samsung tv that has the apps but no android tv.

so do I do the ADB on home assistant or on android tv (I have a Chromecast)

I found a solution see this post