So what concerns me about this reply is that in settings -> developer tools -> states page (which has the raw values), does not produce properly formatted yaml for any of my media players. Yet for you it does. Are you 100% sure you got this list from settings -> developer tool -> states page?
Yes but when I did a cut/paste it warned me to not paste code so I did what it said in order to get it to post without the warning. And i do get an error---it's the one that says cannot connect to Roku API
Should I post it and just ignore the warning?
That log message is the doctored logs though, its' not the raw logs. There's a button you have to click to view raw logs that may expose more logging.
I have no idea what this warning is
That's not a warning, it's telling you how to format your post if it is code.
Ok I must've done it wrong then.
Are you on the latest version of HA?
I'm on Core 2026.6.4, Supervisor 2026.06.2 and OS 18.1
I updated a few days ago but it was acting funky so I restored from the previous day.....that's why I'm not on the latest. But the automation worked for the last couple of years.....I'm not sure which update broke it.....if that's what actually happened
I have a similar automation that runs on another one of my Roku TVs and it is doing the same thing--only with YouTube. Think I will delete both automations and build them from scratch and see it that helps.....
At most you should only have to replace the action.
Ok so I recreated the automation and it's doing the same thing. The really odd part is that if I just trigger it--by pressing the button, it turns on the TV, mutes the volume and stops. But if I open the automation and just manually run the action to select the media source, it will work. And if I change it to open Prime Video, the automation runs as expected using the proper trigger (the button press). So I am more confused now......Here is the new automation
alias: Workout start
description: ""
triggers:
- device_id: e2be57a2bfeb02e3ed32dd61bb061b64
domain: zha
type: remote_button_short_press
subtype: remote_button_short_press
trigger: device
conditions:
actions: - type: turn_on
device_id: fb34e87ef61fc87140fbe2c9466010db
entity_id: 47912e52bd1e0753b6e5f1d1fd3c1410
domain: remote - action: media_player.volume_mute
metadata: {}
target:
entity_id: media_player.gym_tube
data:
is_volume_muted: false - action: media_player.select_source
metadata: {}
target:
device_id: fb34e87ef61fc87140fbe2c9466010db
data:
source: YouTube
mode: single
I just tried disabling the mute action just to see if it makes any difference---it didn't.
I added a 10 second delay before YouTube is selected----didn't help.
But if I just re-trigger the automation by pushing the button, it pulls up YouTube like it should.
It is still warning that there is an error connecting to Roku API
How do I see the more detailed logs?
FWIW, I tend to get an API error for Roku, too, when it's been sitting cold for awhile. After the initial attempt, it "wakes up" and let's me choose the source without issue.
For giggles, open YouTube on the Roku, then check the diagnostics of the device on the integration page.
Check the Active app ID, idk if they're always the same between Roku devices, but mine shows as 837. Try using what yours shows as the source in the automation.
Nice! I'll try that.....
Welp that didn't work.....but it was worth a shot. HA does report the current app correctly tho
One more thing to try. Can you swap out the device_id:
- data:
source: YouTube
target:
device_id: fb34e87ef61fc87140fbe2c9466010db
action: media_player.select_source
... and change that into media_player.roku_xxx entity_id
- data:
source: YouTube
target:
entity_id: media_player.the_entity_name_of_your_roku
action: media_player.select_source
Good idea but it still just won’t load the source. I have to push the button again after a couple of seconds and then it loads…which I guess is good enough for me right now. I’ll be researching the “Unable to connect to Roku API” error some more in the meantime.

