-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix roku play/pause support #35991
Fix roku play/pause support #35991
Conversation
There is no way of knowing current playback state? |
Not exactly besides app being open and no screensaver. Which is the current logic for state. Effectively calling play or pause would always call the same thing (play) so checking state didnt really seem useful. Roku remotes also merge the two controls into 1 button. |
/AzurePipelines Run |
Commenter does not have sufficient privileges for PR 35991 in repo home-assistant/core |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
Not sure if we can consider this a bug fix since we're adding a feature |
I agree on this is adding a feature as well. Removed the milestone. |
i guess its a feature but as it already supported PLAY and had the async_media_play_pause. I see if more as a fix to being partially implemented than a new feature. guess it doesnt hurt to wait a few weeks though |
Going to pick this one in 0.110.2 as the release CI will fail without it. |
http://roku:8060/query/media-player (https://developer.roku.com/en-ca/docs/developer-program/debugging/external-control-api.md#querymedia-player-example) returns 3 states from what I can tell:
So it should be possible to detect the current state. |
fair point, i guess i overlooked that option as it was a bit more technical about video stream. Ill have to review using that but it would increase number of API calls something ive been trying to reduce/optimize lately since taking on maintenance of roku |
Breaking change
Proposed change
When used by various integrations such as alexa (or in the near future google assistant) you can't currently easily control device with voice commands like play or pause because the only method that was implemented was media_play_pause which is mostly meant for service calls and has basic support in lovelace components.
Roku only supports a "play" keypress that is really a play/pause behavior and doesn't offer discrete pause support.
This means that the implementation cant promise to actually pause but it can atleast toggle the play state and make available the "pause" action to integrations. In lovelace it should allow the pause icon rather than stop icon which is more accurate to what the actual keypress does.
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale: