Turn TV On, run YouTube and play a specific video

I’ve been searching for a specific automation to integrate into my Home Assistant. I’d like to create a button on the dashboard that, when pressed (or triggered automatically), will turn on the TV, open YouTube, and play a specific video—such as a fireplace scene. This should be a standalone automation. In the future, it could also be triggered when I walk into the house, so that the fireplace video automatically plays on the TV.

Can you help me with this script/automation or point to the instruction/video if this automation was already made. Thank you

It would depend on your TV manufacturer and whether it’s already integrated in HA. Most major brands support what you’re asking for (eg. the LG integration supports turning on the TV & switching source) and the Media Player integration will allow you to start playing the video using media_content_id.

Use the search in these forums - other users have had your same need and managed to get it to work.

I ran into the same issue and wanted a simple way to start a fireplace video on my TV.

YouTube technically works, but the ads are annoying, and I also didn’t want to keep streaming 4K video for hours and unnecessarily load my ISP connection.

My solution was to use Home Assistant’s Chromecast integration:

  • I downloaded a fireplace video and stored it locally on my HA OS system in the /media folder.
  • I created a helper switch called fireplace.
  • When the switch is turned on, an automation starts the Chromecast and plays the local fireplace video.
  • When the switch is turned off, the automation turns the TV off again.

The result is fast, ad-free, and fully local playback — no internet connection required.