YouTube on TV: HA now knows when a YouTube ad is playing, so it can mute it and press Skip for you
A couple of days ago, the Disney+ ad mute post had a few people asking about YouTube. For YouTube you don't need the position trick: the YouTube app reports ads directly, and I've been building an integration around that.
YouTube on TV connects to the YouTube app on your TV the same way your phone does when you cast (YouTube's Lounge protocol). No Google account or API key needed, and updates are pushed instantly. Each TV gets:
- Ad playing sensor, and a Skip ad button that becomes available the moment YouTube offers skip
- A media player with title, channel, thumbnail and position, plus play/pause/seek and play-by-URL
- A queue as a to-do list: paste a link to add a video, drag to reorder
- Autoplay, subtitles and playback speed controls
It works whether playback started from a phone or the TV remote.
Mute during ads (use your TV's own media player for the volume):
alias: Mute YouTube ads
triggers:
- trigger: state
entity_id: binary_sensor.youtube_on_living_room_tv_ad_playing
to: "on"
id: ad
- trigger: state
entity_id: binary_sensor.youtube_on_living_room_tv_ad_playing
to: "off"
actions:
- action: media_player.volume_mute
target:
entity_id: media_player.living_room_tv
data:
is_volume_muted: "{{ trigger.id == 'ad' }}"
Auto-skip: trigger on the Skip ad button going from unavailable and press it. More examples are in docs/automations.md.
Tested on: Samsung Tizen (two models), LG webOS, Onn 4K, NVIDIA Shield and Apple TV 4K, thanks to people in the HA community thread. Android TV boxes and Apple TV need to be added with YouTube's "Link with TV code". On LG, the ad sensor can be a little slow to turn on.
Not tested yet: Fire TV, Roku and Chromecast with Google TV. If you have one, I'd love a report.
Install: it's in HACS, search "YouTube on TV".
GitHub: jorgediez/ha-youtube-on-tv
To be clear about limits: Skip only presses skip when YouTube offers it, so unskippable ads still play (muting covers those). It isn't a Premium replacement, and it uses an undocumented protocol YouTube could change. Built on pyytlounge, with discovery ideas from iSponsorBlockTV, which is great if you don't need it in HA.
88 points · 47 comments
Mentions
YouTube on TV: HA now knows when a YouTube ad is playing, so it can mute it and press Skip for you A couple of days ago, the Disney+ ad mute post had a few people asking about YouTube. For YouTube you don't need the position trick: the YouTube app reports ads directly, and I've been building an integration around that. YouTube on TV connects to the YouTube app on your TV the same way your phone does when you cast (YouTube's Lounge protocol). No Google account or API key needed, and updates are pushed instantly. Each TV gets: - Ad playing sensor, and a Skip ad button that becomes available the moment YouTube offers skip - A media player with title, channel, thumbnail and position, plus play/pause/seek and play-by-URL - A queue as a to-do list: paste a link to add a video, drag to reorder - Autoplay, subtitles and playback speed controls It works whether playback started from a phone or the TV remote. Mute during ads (use your TV's own media player for the volume): alias: Mute YouTube ads triggers: - trigger: state entity_id: binary_sensor.youtube_on_living_room_tv_ad_playing to: "on" id: ad - trigger: state entity_id: binary_sensor.youtube_on_living_room_tv_ad_playing to: "off" actions: - action: media_player.volume_mute target: entity_id: media_player.living_room_tv data: is_volume_muted: "{{ trigger.id == 'ad' }}" Auto-skip: trigger on the Skip ad button going from unavailable and press it. More examples are in docs/automations.md. Tested on: Samsung Tizen (two models), LG webOS, Onn 4K, NVIDIA Shield and Apple TV 4K, thanks to people in the HA community thread. Android TV boxes and Apple TV need to be added with YouTube's "Link with TV code". On LG, the ad sensor can be a little slow to turn on. Not tested yet: Fire TV, Roku and Chromecast with Google TV. If you have one, I'd love a report. Install: it's in HACS, search "YouTube on TV". GitHub: jorgediez/ha-youtube-on-tv To be clear about limits: Skip only presses skip when YouTube offers it, so unskippable ads still play (muting covers those). It isn't a Premium replacement, and it uses an undocumented protocol YouTube could change. Built on pyytlounge, with discovery ideas from iSponsorBlockTV, which is great if you don't need it in HA.
Sponsor Ads can be blocked on the Apple TV YouTube app using iSponsorBlockTV on a home server: dmunozv04/iSponsorBlockTV
lo peor es que si se puede dmunozv04/iSponsorBlockTV
iSponsorBlockTV is the most underrated service I set this service up probably 9 months ago touched it once since due to a update that changed YouTube id's. It's the type of service that you never appreciate until it stops working. I think everyone who regularly watches YouTube as their TV entertainment platform it's a must have program and can run on anything. Edit: Alternative YouTube clients are so amazing! They offer similar or more features than what iSponserBlockTV does and I have provided a list of some options. IPhone: uYouEnhanced Android: NewPipe Android TV: SmartTube Roku:Playlet Other TV OS typically have a available alternative you must just do a little research. NOT A MAINTAINER OR AFFLIATE OF PROJECT JUST REALLY LOVE IT