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

Add sendButton command to send remote button presses #147

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Add sendButton command to send remote button presses #147

merged 1 commit into from
Dec 11, 2023

Conversation

Tenzer
Copy link
Collaborator

@Tenzer Tenzer commented Dec 10, 2023

This makes it possible to send a sequence of button presses (among the current options) to the TV which can help automate actions that can't otherwise be achieved with the normal API.


https://github.com/JPersson77/LGTVCompanion/blob/master/Common/lg_api_buttons.h has a list of more button presses that appear to be possible options. We could potentially look at adding them later.

Fixes #66.

parser.print_help()
sys.exit(1)
except Exception:
if args.command not in {"sendButton"}:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not quite satisfied with this hack to add support for an extra command that isn't on the LGTVRemote class.

I wonder if we can do something to make exposing commands to the CLI cleaner, but that might be for future work.

This makes it possible to send a sequence of button presses (among the current
options) to the TV which can help automate actions that can't otherwise be
achieved with the normal API.
@Tenzer Tenzer mentioned this pull request Dec 10, 2023
@klattimer klattimer merged commit 5fae23d into klattimer:master Dec 11, 2023
3 checks passed
@klattimer
Copy link
Owner

I've added you as a contributor to the project, I think you probably need a bit of freedom in this now as you've taken up a fair bit of my mornings clearing PRs.

Not a bad thing, but #levelup

@Tenzer Tenzer deleted the add-sendButton-command branch December 11, 2023 09:19
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

Successfully merging this pull request may close these issues.

Direction controls...
2 participants