Show Youtube Stream in HA Lovelace

Hi,

seems to be a simple task?
But can not find a way.
Perfectly if it will be as a Camera and can be used in picture-glance card.

Someone knows?

If you are looking for showing any youtube on your lovelace, you dont need to create a camera or picture-glance card, you can do this with iframe card like below.

type: iframe
url: 'https://www.youtube.com/embed/k_1Le5ZnHvg'
aspect_ratio: 75%

But here the main thing is the url. For getting your video url, you just have to change the video_id of the above url which is k_1Le5ZnHvg. You can get the video id of any youtube video from the youtube page url. for example the youtube page url for this video is https://www.youtube.com/watch?v=k_1Le5ZnHvg . The last part of the url is the video id.

Also if you want the video to be muted and auto playing, change the url like this.

https://www.youtube.com/embed/tgbNymZ7vqY?autoplay=1&mute=1

Hope this works out. If you are still particular about a camera entity and showing the video in picture-glance, do let know

3 Likes

I would like to show it in picture-glance card.

Thank you. This was exactly what I was looking for.

1 Like

I have been trying to figure out how to do this exact thing for a while and just stumbled across this thread. Thank you!!!

Any chance there is a way to do this with a YouTube TV channel?

I use an YouTube live Channel Stream With iframe Card. Works Till about 20min fine when i watch the Channel. But Than the Stream Stop and the Lovelace reload. Any Idea why?
In Log i See No Problem. Also my Hardware for HAS is very good because i use an PC With octa Cote, 8GB RAM, SSD…

Thanks

I’ve tried this, but the video doesn’t automatically start when I open the dashboard with the embedded video. I’ve used exactly your link. I’ve also tried another video.