I have live TV channels on my Plex server (via an OTA antenna) and would like to play a specific one on my ‘Chromecast with Google TV’ via an action. 15 minutes of Google have indicated it’s not possible (although the Google AI Overview confidently said it was
), however the forum posts I found were also all from 4+ years ago, so perhaps something has changed since then. Any way to do this? I have the Plex Media Server, Google Cast and Android TV Remote HA integrations but am also open to any less ‘official’ methods. Thanks!
Stay tuned on this, I have a working automation to do just this with Plex Live TV. The trick is that you must use button presses. An example if Live TV is right below Home. On my google tv it lands on home but actually selects the first show in the continue watching show. Its one left one down one right (i have the 4 channels i need in the favorites to make this simpler) then select or that basic thing. Right now it has 10 sec delays for troubleshooting. I think it needs at least 10 sec for plex to load, maybe more if it has to turn on the TV, this automation and script do that in case its off. The turn on command is refundant if its on, but doesnt matter. I also think its necessary for live tv to load, but this most likely system dependanat an number of stations. Mine has about 150, but I think I’m giving it a haircut and get rid of anything no one watches to speed things up. It also has ot load all the plex channesl. The delays between navigation arrrows can probably be 1 sec. Time you plex start up. Time when the buttons fully settle. Then time live tv. Adjust accordingly. In my case 10 sec delays matter not. I have it tune 5min after scheduled game time, because the first 10 min are sportscasters gab, game start is usually at least 10min later. I will for sure post this later. I also have a great automation to remind her of game times via the speakers. I am going to combine these two down the road, but they still need more real world testing. The Announcemnt one worked perfect the last 2 games. There has not been a game since I got the tuning automation to work, but I ran the script on each of the 4 stations that might carry the game. If you want this for sports and maybe others you will need to load a calendar for your teams in either google calendar or the built in local one. I have it in Google. I don’t know about Apple stuff. I am in the USA and all pro sports have free calendars available, I suspect everywhere does, but I don’t know
Interesting. Honestly, a little more hacky than I’d prefer but I’d still be curious to try it out. Post the YAML when you get a chance.
Have you used the Team Tracker custom integration?
It works quite well; I use it to trigger an automation (including a notification with the TV station and game time) 30 minutes prior to the game as well as scoring and win/lose automations. Completely unnecessary, but that applies to a lot of HA things.
I will of course take a look. But the Celtics calendar works well. I got other automations and projects that are more pressing. I am not sure though on how hacky this is. The idea actually came from the old days of using girder and netremote to do some of what HA is. In those days IR was about the only way to do things, so button presses was the only to naviate. It actually works quite well, especially if it only has a few to do. I think this automation is best suited for no more than 20max because of the numbers to do so. In my absolute case its only 4 stations, so well fewer than 10 total button presses to get to your desired spot. I would doubt plex exposes live tv, especially thier branded shows, plus even if they are, I expect it is low priority. My next one similar to this is to play video playlists. All the Plex integrations, cards,scripts etc have not exposed video playlists. I have several for my wife, like Random Western Or Random Clint Eastwood Movies. I would like to add voice commands for her so she could say hey mycroft play a random western or something along those lines. She has alzheimers and has difficulty remembering things, so this removes any complexity. Again, smaller lists are better, plex sorts playlists alphabetically, so any new add will change it. I am going to first make all the playlists I need, which should be les than 10. Now the order is fixed. Its a few more button presses than stuff in the favorite of live TV, but still not too many. On a side note, it may be a pain for you or i to press down 20 times, but mycroft wont care. HAHA
That tracker sounds great, but we really only watch the celtics, thoug I like San Antonio and maybe I will add them to the mix. This may might be better, live scores could be interesting. Here is the script that is needed for the automation. I will post it next. This is for a google chromecast, though others like Roku could probably work similar. No games have been played yet, but time triggers have always worked well. I have run the script 10 times without fail. Put 4 favorites in your plex live tv. Then try the script, you must put the Station ID exactly as it is in the script. So to get to ABC you put ABC in the script window. HIt run. It should navigate to postion 2 and select enter. ABC is now playing. HA doesn’t get any feedback here at least in my setup. Timing is the key. These timings are probably too much, but thats an easy fix. I do again think you need pauses between starting plex before it moves the button and when you land on Live Tv. Be sure to not check no repeats and hold time. The hold time causes the down left right up arrows to press more than once. For now, I am not going to make a ful ldeal for 10-15 favorites, but its certainly doable.
alias: Tune Celtics DVR Channel on Plex
fields:
channel_name:
description: >-
The name of the TV station broadcasting the game (e.g., ‘NBC Sports
Boston’).
example: ESPN
required: true
selector:
text: null
sequence:
- target:
entity_id: media_player.living_room_tv_2
action: media_player.turn_on - delay: “00:00:03”
- target:
entity_id: remote.living_room_tv
data:
activity: plex://play
action: remote.turn_on - delay: “00:00:10”
- target:
entity_id: remote.living_room_tv
data:
command: DPAD_LEFT
action: remote.send_command - delay: “00:00:05”
- target:
entity_id: remote.living_room_tv
data:
command: DPAD_DOWN
action: remote.send_command - delay: “00:00:05”
- target:
entity_id: remote.living_room_tv
data:
command: DPAD_RIGHT
action: remote.send_command - delay: “00:00:05”
- target:
entity_id: remote.living_room_tv
data:
command: >
{% set channel = channel_name | trim %} {% if channel == ‘NBC Sports
Boston’ %}
{{ }}
{% elif channel == ‘ABC’ %}
{{ [‘DPAD_DOWN’] }} # Down 1
{% elif channel == ‘ESPN’ %}
{{ [‘DPAD_DOWN’, ‘DPAD_DOWN’] }} # Down 2
{% elif channel == ‘TNT’ %}
{{ [‘DPAD_DOWN’, ‘DPAD_DOWN’, ‘DPAD_DOWN’] }} # Down 3
{% else %}
{{ }}
{% endif %}
action: remote.send_command - delay: “00:00:05”
- target:
entity_id: remote.living_room_tv
data:
command: DPAD_CENTER
action: remote.send_command
Here is the full automation to go with the script posted before.
alias: Tune Celtics Game on Plex at Start Time
description: Opens Plex and tunes the specific Celtics channel before the game starts.
triggers:
- event: start
entity_id: calendar.boston_celtics_2025_26_full_season_schedule
offset: “-0:5:0”
trigger: calendar
conditions:
actions: - variables:
tv_station: >
{% set desc = trigger.calendar_event.description | default(‘’) %} {% if
‘ESPN’ in desc %}
ESPN
{% elif ‘NBC’ in desc %}
NBC Sports Boston
{% elif ‘TNT’ in desc %}
TNT
{% elif ‘ABC’ in desc %}
ABC
{% else %}
unknown channel
{% endif %} - data:
channel_name: “{{ tv_station | trim }}”
action: script.tune_celtics_dvr_channel
Here is my first automation to send reminders to my wife about the upcoming games. It works well and it has worked the last 2 games perfectly.
alias: Boston Celtics Game Reminders
description: Announce Celtics game details 1 hour and 15 minutes before tipoff
triggers:
- event: start
entity_id: calendar.boston_celtics_2025_26_full_season_schedule
offset: “-1:0:0”
id: one_hour_reminder
trigger: calendar - event: start
entity_id: calendar.boston_celtics_2025_26_full_season_schedule
offset: “-0:15:0”
id: fifteen_minute_reminder
trigger: calendar
actions: - variables:
game_summary: “{{ trigger.calendar_event.summary | default(‘Boston Celtics game’) }}”
game_start: >-
{{ as_timestamp(trigger.calendar_event.start_time | default(now())) |
timestamp_custom(‘%-I:%M %p’) }}
desc: “{{ trigger.calendar_event.description | default(‘’) }}”
tv_station: >-
{% if ‘ESPN’ in desc %}ESPN {% elif ‘NBC’ in desc %}NBC Sports Boston {%
elif ‘TNT’ in desc %}TNT {% elif ‘ABC’ in desc %}ABC {% else %}unknown
channel{% endif %} - choose:
- conditions:
- condition: trigger
id: one_hour_reminder
sequence: - data:
entity_id: media_player.announcement_group
message: >-
Reminder: The Boston Celtics have a game starting in one hour!
{{ game_summary }} begins at {{ game_start }} on {{ tv_station
}}.
action: tts.cloud_say
- condition: trigger
- conditions:
- condition: trigger
id: fifteen_minute_reminder
sequence: - data:
entity_id: media_player.announcement_group
message: >-
The Boston Celtics game is starting soon! Tipoff is in 15
minutes at {{ game_start }} on {{ tv_station }}. Grab your
snacks and get ready for the game.
action: tts.cloud_say - metadata: {}
data:
message: >-
The Boston Celtics game is starting soon! Tipoff is in 15
minutes at {{ game_start }} on {{ tv_station }}. Grab your
snacks and get ready for the game.
title: Boston Celtics Game
action: notify.mobile_app_doug_s_watch - metadata: {}
data:
message: >-
The Boston Celtics game is starting soon! Tipoff is in 15
minutes at {{ game_start }} on {{ tv_station }}. Grab your
snacks and get ready for the game.
action: notify.android_tv_fire_tv
mode: single
I forgot that Gemini actually suggested the using clicks to navigate to whereever you like. I didn’t come up with that gem, but I used to use girder and netremote to control Home theater stuff with mostly IR in those old days and sometimes this was all that would work. Aha. Figuring out to remove the Hold and make sure no repeats was my little contribution. Which was a holdover from my IR days. I am a total newbie here, so I probably won’t be much help for failure, but Gemini can. I have done 5 automations with Gemini and it didn’t work the first time and so far not the second. But by 5 or 6 we usually have gotten it to mostly work and some have completely worked. It has done all of them, so far 6. More to come. This isn’t meant as a full service either. It will work well on a small number of channels. I also will most likely combine these two into one, but I am going to make sure they work well for a couple of weeks first.
- condition: trigger
- conditions:
Thanks for the info! FYI, your YAML isn’t really readable without formatting. Use the </> button to format it properly. ![]()
I had considered the button press method before (forgot about it but remembered it as I dug into the documentation), but like I said, it felt a bit hacky and had the issue of requiring always starting from the same position. Didn’t realize the “plex://play” command would do a ‘hard’ restart of the app, making it consistent (versus just reopening it wherever you were before).
Still not loving this method, as any changes to the layout or app breaks it, but with this being more of a party trick than anything important, it’ll do. I was able to get away with essentially no delays between button presses (except in a few cases where the screen needs to update).
sorry I am 74, so posting the very few times I have I seldom know about such things. HAHA
One little thing I should have said the deep link plex:// isnt reliable as most at least for me. If I send the plex:// with a remote it doesn’t always open up if you are in another app. It often lands on the google tv home page. I have voice command to open plex. It wasn’t reliable with a home command first. So home command, then plex://. All the others will go straigh from another app, plex did sometimes, but not reliably. I will read up and try posting the yaml files properly. or copy and paste my garbled text and ask Gemini or one of those really clever AI’s to do it for you. I did this to help my wife that has Alzheimers, I have a part time job, so I am not always home to put the game on for her. But, for a few channels it might work well. The time trigger works on another automation, so that shoud be good. I have ran the script at least 10x with the TV off and on. Perfect everytime. The timing is probably system dependant, but easy to change. I made them high to make sure it worked. After it gets its first live testing I think I will change the buttons to 1sec or even .5. But form follows function, so I wanted it working first. I think the more channels you have the slower Plex loads, plus its got a few hundred Plex channels.