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

FireTV (Integrated in Smart TV) Power On functionality #253

Open
JoeSchubert opened this issue Jul 25, 2021 · 1 comment
Open

FireTV (Integrated in Smart TV) Power On functionality #253

JoeSchubert opened this issue Jul 25, 2021 · 1 comment

Comments

@JoeSchubert
Copy link

JoeSchubert commented Jul 25, 2021

One of my main annoyances with this integration has been with powering on my device. The default is for the device to send the power button followed by home if it is off.

await self._adb.shell(constants.CMD_SCREEN_ON + " || (input keyevent {0} && input keyevent {1})".format(constants.KEY_POWER, constants.KEY_HOME))
and
self._adb.shell(constants.CMD_SCREEN_ON + " || (input keyevent {0} && input keyevent {1})".format(constants.KEY_POWER, constants.KEY_HOME))
this effectively breaks the television turning on the last input if it is configured to do so.

While this can easily be fixed by adding:
turn_on_command: "input keyevent 26"
to the configuration, in order to override the default... I was curious if it might be feasible to make the default functionality follow what the television settings are set to. This can be determined by:
adb shell settings get secure power_on_launch_mode
where
0 = home
1 = last input

I'm not really sure if there's anything being stored in this implementation that would determine that dynamically though.

thanks in advance.

@JeffLIrion
Copy link
Owner

It's probably possible to create a shell command that processes (i.e., greps) the output of that command and only sends the "home" button action if that's what the setting specifies.

But I think the complexity of doing so and making sure that it works as expected across all devices makes this not worthwhile, given that there's a simple means for users to customize the turn on/off commands.

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

2 participants