home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.79k stars 28.93k forks source link

cannot configure roku through UI (or even in scenes.yml) as part of a scene #95187

Closed josh-m-sharpe closed 6 months ago

josh-m-sharpe commented 1 year ago

The problem

I want to configure a scene that, if invoked: 1) turns on the roku/tv if it's off 2) leaves the roku/tv alone if it's already on

I want to configure a second scene that: 1) Turns off the roku/tv

These things are shockingly difficult to do. The bug/feature request here is that I would like to configure a roku like I can configure a light bulb. Both things (lights and rokus) turn on and off, I should be able to configure them in scenes somewhat similarly.


I want to preface all of this with the understanding the Roku's don't really turn themselves on and off. They're always on. So anywhere I mention turning it on and off I'm actually referring to the TV its plugged into. That said, the services, media.turn_on and media.turn_off (called against the roku media_player entity) work well. They reliably turn the TV connected to the roku on and off. So the functionality is there, it's just inaccessible in a scene.

The rest of this describes how it's effectively impossible to create a scene that turns a tv-attached-roku on and off.


While editing a scene, if you add a roku as a device, this happens: Settings_–_Home_Assistant Settings_–_Home_Assistant And it adds all of this to scenes.yml:

- id: '1687657482264'
  name: Roku Scene Test
  entities:
    remote.roku_living_room:
      friendly_name: Living Room Roku
      supported_features: 0
      state: 'on'
    media_player.roku_living_room:
      source_list:
      - Home
      - 'ABC: Watch New Shows & Live TV'
      - AMC
      - etc...
      - Watch TBS
      - YouTube
      - YouTube TV
      media_content_type: app
      app_id: '562859'
      app_name: Home
      source: Home
      device_class: receiver
      entity_picture: /api/media_player_proxy/media_player.roku_living_room?token=96caa2d47f6b4ded0b12abc0c9a2c5b59b99f2b736f291806619c0b30e06a104&cache=28c499bc8e60a574
      friendly_name: Living Room Roku
      supported_features: 151481
      state: idle
  icon: mdi:remote-tv
  metadata: {}

First off, that remote.roku_living_room does nothing. There's no documentation for it. If I make a scene with just that entity and call the scene it doesn't turn the tv on. If I change state to off in the config and call that scene it doesn't turn the tv off. If you open up the config for it and toggle this switch off, it will turn the tv off, but then the switch flips back to on moments later. So this thing is as far as I can tell just a rabbit hole of confusion. Settings_–_Home_Assistant


Secondly, if I go to edit the media_player.roku_living_room in the UI, I see this: Settings_–_Home_Assistant That Power button there? It'll turn the Roku off - but it won't turn the Roku on. And even if you make that "change" it doesn't make the "Save" button pop up in the scene editor, so you can't save the scene. The only thing that seemingly/sorta works reliably well is to: 1) Add this media player entity 2) Turn on the Roku with the actual remote 3) Set the Source to something 4) Change anything else in the lovelace scene editor like a light or something (but definitely nothing related to the Roku). 5) Click Save Ignoring for a moment that it takes 5 steps involving a physical remote and altering a light to save the Roku settings... This still creates a situation where when the scene is invoked, the roku switches to that source. That's a problem because 1) I don't want to always start Netflix when the roku starts and 2) if the roku is on, in another app, I don't want it to switch to Netflix.

Point is, there's now way to configure "just simply turn the thing on"

There is also no "turn off" from the scene editor.

The frustrating thing is, calling services works decently well. media_player.turn_on -- is a simple "turn on" and it doesn't change source if the roku is already playing. ditto media_play.turn_off. But it's darn near impossible to invoke a script from a scene. If you can manage it with an input_boolean, and an automation tied to that boolean it's extremely convoluted.

What version of Home Assistant Core has the issue?

2023.2.5

What was the last working version of Home Assistant Core?

never, this has never worked

What type of installation are you running?

Home Assistant Container

Integration causing the issue

roku

Link to integration documentation on our website

https://www.home-assistant.io/integrations/roku/

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (remote) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `remote` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign remote` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


remote documentation remote source (message by IssueLinks)

home-assistant[bot] commented 1 year ago

Hey there @ctalkington, mind taking a look at this issue as it has been labeled with an integration (roku) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `roku` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign roku` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


roku documentation roku source (message by IssueLinks)

josh-m-sharpe commented 10 months ago

Hey there @ctalkington, mind taking a look at this issue as it has been labeled with an integration (roku) you are listed as a code owner for? Thanks!

ctalkington commented 10 months ago

that is pretty frustrating, I myself only use scenes for a few lights and hadn't tried automating the device.

do you see similar behaviors with other media players? I wonder if it's needing some TLC on scene editor side or what.

so the power button, it's funny you mention it not working to turn the device on after off. I have been meaning to figure out that behavior but life... I'll see about testing it a bit over next few weeks.

the remote exists to send key commands to roku. https://www.home-assistant.io/integrations/roku/#remote

ctalkington commented 10 months ago

I don't recall if there's any core restrictions against having a media player and switch platform that do same thing. I feel like switch would be way easier to scene automate. I'll have to do some research.

ctalkington commented 10 months ago

actually the remote toggle should call poweroff and poweron like a switch would if it existed. but you are seeing it toggle back. what roku device do you have? how's it connected? do you have fast start enabled? how is it controlling your tv? hdmi cec?

josh-m-sharpe commented 9 months ago

@ctalkington just seeing your response. The only other media player I use is Home Theater Receiver. I use three different Rokus - but they all operate the same with Home Assistant.

I have the "Streaming Stick" ones - so they plug directly into my TVs via HDMI.

I don't know what "fast start" is. In case it's possibly related, I never use my TV's actual remote. Only the roku to power on and off the TV (which you configure in the Roku menus somewhere). can just press power on the roku remote and the TV will come up.

As mentioned above the "remote" device doesn't seem to do much.

issue-triage-workflows[bot] commented 6 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.