nstrelow / ha_philips_android_tv

Home Assistant custom component for the newer (2016+) Philips Android TVs
109 stars 28 forks source link

Feature request: send any key #35

Open denilsonsa opened 4 years ago

denilsonsa commented 4 years ago

Someone found a list of supported commands https://community.home-assistant.io/t/philips-android-tv-component/17749/12

Standby
Back
Find
RedColour
GreenColour
YellowColour
BlueColour
Home
VolumeUp
VolumeDown
Mute
Options
Dot
Digit0
Digit1
Digit2
Digit3
Digit4
Digit5
Digit6
Digit7
Digit8
Digit9
Info
CursorUp
CursorDown
CursorLeft
CursorRight
Confirm
Next
Previous
Adjust
WatchTV
Viewmode
Teletext
Subtitle
ChannelStepUp
ChannelStepDown
Source
AmbilightOnOff
PlayPause
Pause
FastForward
Stop
Rewind
Record
Online

(EDIT: some other project seems to maintain a list of commands: https://github.com/eslavnov/pylips/blob/master/available_commands.json )

I see this ha_philips_android_tv custom component has a send_key method. Would it be possible to expose this method as a service with a string parameter? Or as a list of strings (so the buttons would be sent in sequence)? Then this component could be used together with a custom lovelace card, such as https://github.com/marrobHD/tv-card

nstrelow commented 4 years ago

Good idea, definitely possible! Though I am currently not able to test anything, since I am not where my Philips TV is (and have been over a year now).

So 2 possibilities: