-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Add select hold to AppleTVs remote entity as possible command #105764
Add select hold to AppleTVs remote entity as possible command #105764
Conversation
Hey there @postlund, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
In general you are right. I would agree for the _hold commands to do so. Another question: When adding the hold_secs parameter it maybe makes sense to make a breaking change and also remove the home_hold command completely. If you agree on all of this I can change the PR to add hold_secs and remove home_hold |
I already added hold_secs to the implementation |
…elect-hold' of github.com:myMartek/core into feature/apple-tv-select-hold
Not sure how much help I can be to you here but I've been following along this issue for a few weeks. As an AppleTV User, a double tap is used on the menu button on the remote to pull up the "Open apps" menu to close apps or switch between them. I'm not sure of any other mechanism to do this action other than a double-tap on the menu button. Also eagerly awaiting a fix for the broken home_hold. |
That’s true. But actually the double Tap works with the current implementation and I only see drawbacks and issues when implementing the doubleTap method of pyatv. In my opinion the current implementation is superior then implementing doubleTap. You can issue a doubleTab by setting repeat to 2 and delay to eg 100ms In my opinion this pull request should be merged as soon as possible. Yes it removes the current home_hold function and replaces it with the hold delay of HA. This is a breaking change which should normally have a deprecation beforehand. But in my opinion it’s not worth to deprecate a feature that is currently broken. I guess it’s best to merge this bevor 23.1 release. |
Any news on merging this PR? |
On Apple tvOS 17.2 when you press de power button short the upper menu will appear, so it doesn’t have to be |
This might be true for your Apple TV, but for my model I don’t have a power button to press so after updating I do not have this option with the remote I have. The remote option controls homeassistant provide also don’t currently solve this issue from what I’ve seen so I’d argue the new home_hold function is still desperately needed to fix the issue |
When can this change be merged? All in all I don't believe its too big. But it fixes the hold actions which are currently not working at all. |
Hi! Any luck merging this? Anxiously awaiting this fix! 🤞🏻 |
There also doesn't appear to be a way to "press the power button" from home assistant. I've found no way to trigger the upper menu since home_hold stopped working. |
@myMartek It's mentioned in the comments this is a breaking change because the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @myMartek 👍
However, please fill in the breaking change section of the PR description.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I now filled the breaking change section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @myMartek 👍
) | ||
assert len(remote.atv.method_calls) == 1 | ||
assert str(remote.atv.method_calls[0]) == f"call.{method}()" | ||
if hold_secs >= 1: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use conditions in tests. Either parametrize the test further or make a separate test to test this case.
Not sure this is really a fix. I changed my use of send_command home_hold to using home with various hold_seconds values (1, 2, 3, 5, etc) but nothing pops up the control panel. |
This has not yet been released. The fix is not yet live. Just wait for 2024.4.4 which will include the fix. |
Breaking change
The home_hold command has been removed due to issues encountered since Home Assistant version 2023.11.1. Instead, users can now utilize the standard
service data attribute
hold_secs
in conjunction with thehome
action. This combination allows for button holding, enabling the display of the control center.Proposed change
This PR adds the select_hold command for AppleTV remotes. It is used in some programs in order to open a context menu which is otherwise not available.
Type of change
Additional information
Checklist
ruff format 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
.To help with the load of incoming pull requests: