Fire events on homekit TV remote key press#29588
Conversation
|
Hey @MartinHjelmare I noticed you have recently reviewed some homekit PRs, do you think you'd be able to take a look at this PR? |
|
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Nooo stale bot, I promise I am coming back to this! 😱 Hopefully this weekend 🤞 |
|
@nickw444. I’m going to be working in this area soon. Mostly a heads up in case you want to get this PR in before and avoid having to work out a conflict |
|
@nickw444 I'm done the changes I mentioned so there shouldn't be any new conflicts. I fixed the conflict that did pop up (it will need an isort/black run) |
|
@MartinHjelmare Noticed you self assigned this. I'm thinking about a different approach that avoids the custom events in #35421 |
|
I've just assigned myself since I've done a review. |
Hey @bdraco it's not immediately clear to me whether that PR makes this one obsolete (as it's closed). Should I continue to push forward with this? I've locked in some time this weekend to look into this if so 😄 |
Please continue with this PR. Thank you! |
|
@nickw444 You can find the lines with missing test coverage with |
MartinHjelmare
left a comment
There was a problem hiding this comment.
Can be merged when build passes.
bdraco
left a comment
There was a problem hiding this comment.
One suggested change inline, and the CI should pass.
Co-authored-by: J. Nick Koston <nick@koston.org>
Description:
Follow up to #26671 with a different approach (event based) based on feedback provided.
This PR adds support for TV's (with
device_class: tv) to have events emitted when a key is pressed within the apple remote widget. These events can be connected in automations to control the TV in whatever way is appropriate for the user's use-case.Since there is no existing service on media_player for generic button navigation/presses (and I think that is a whole can of worms), this PR adds a way for users to control their media devices via the iOS remote widget.
Without this PR, the remote currently only supports play, pause, volume up and volume down. This PR does not change this, but does fire events for these buttons too.
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#11382
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest.requirements_all.txtby runningpython3 -m script.gen_requirements_all..coveragerc.If the code does not interact with devices: