Skip to content
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

Request: More Remote Functions #87

Open
Wawsax opened this issue Feb 16, 2023 · 1 comment
Open

Request: More Remote Functions #87

Wawsax opened this issue Feb 16, 2023 · 1 comment

Comments

@Wawsax
Copy link

Wawsax commented Feb 16, 2023

Is it possible to add more functionality from the TV remote? I'd really love to have the 'Input' command.

I know there's source selection and I could probably write a source cycle function, but I'd prefer the prompt and choose approach as I'm working with limited buttons on an old bluetooth ATV remote. Great work on the library though, works perfectly and is surprisingly responsive.

@Wawsax
Copy link
Author

Wawsax commented Feb 24, 2023

Well I ended up using Shortcuts and its 'terminal over ssh' stuff to switch inputs by voice command using the SourceControl part of the library. Works better than a button, actually. If nobody else is interested this can be closed.

In case anyone finds it useful, I'm also using this to switch inputs when I don't feel like talking to Siri:

src = SourceControl(client).list_sources()  
if ApplicationControl(client).get_current()[18:] == "1":
    SourceControl(client).set_source(src[1])
elif ApplicationControl(client).get_current()[18:] == "2":
    SourceControl(client).set_source(src[2])
elif ApplicationControl(client).get_current()[18:] == "3":
    SourceControl(client).set_source(src[3])
elif ApplicationControl(client).get_current()[18:] == "4":
    SourceControl(client).set_source(src[0])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant