mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 14:56:53 +00:00
Remote platform documentation for AndroidTV (#29777)
* Remote platform documentation for AndroidTV * Apply suggestions from code review Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
deb753a915
commit
cb8950b1f8
@ -3,6 +3,7 @@ title: Android Debug Bridge
|
|||||||
description: Instructions on how to integrate Android and Fire TV devices into Home Assistant.
|
description: Instructions on how to integrate Android and Fire TV devices into Home Assistant.
|
||||||
ha_category:
|
ha_category:
|
||||||
- Media player
|
- Media player
|
||||||
|
- Remote
|
||||||
ha_release: 0.7.6
|
ha_release: 0.7.6
|
||||||
ha_config_flow: true
|
ha_config_flow: true
|
||||||
ha_iot_class: Local Polling
|
ha_iot_class: Local Polling
|
||||||
@ -13,6 +14,7 @@ ha_domain: androidtv
|
|||||||
ha_platforms:
|
ha_platforms:
|
||||||
- diagnostics
|
- diagnostics
|
||||||
- media_player
|
- media_player
|
||||||
|
- remote
|
||||||
ha_integration_type: device
|
ha_integration_type: device
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -243,3 +245,99 @@ The solution to this problem is the `state_detection_rules` configuration parame
|
|||||||
- `'audio_state'` = try to use the `audio_state` property to determine the state
|
- `'audio_state'` = try to use the `audio_state` property to determine the state
|
||||||
|
|
||||||
To determine what these rules should be, you can use the `androidtv.adb_command` service with the command `GET_PROPERTIES`, as described in the [androidtv.adb_command](#androidtvadb_command) section.
|
To determine what these rules should be, you can use the `androidtv.adb_command` service with the command `GET_PROPERTIES`, as described in the [androidtv.adb_command](#androidtvadb_command) section.
|
||||||
|
|
||||||
|
## Remote
|
||||||
|
|
||||||
|
The integration supports the `remote` platform. The remote allows you to send commands to your device with the `remote.send_command` service. You can send either keys or ADB shell commands to your Android / Fire TV device. The supported keys vary between Android models and version.
|
||||||
|
|
||||||
|
{% details "Full keycodes list" %}
|
||||||
|
|
||||||
|
**Power Keys**
|
||||||
|
Key|Description
|
||||||
|
---|-----------
|
||||||
|
"POWER"|Power toggle
|
||||||
|
"SLEEP"|Sleep mode
|
||||||
|
"RESUME"|Resume
|
||||||
|
"SUSPEND"|Suspend mode
|
||||||
|
"WAKEUP"|Wake up
|
||||||
|
____________
|
||||||
|
|
||||||
|
**Input Keys**
|
||||||
|
Key|Description
|
||||||
|
---|-----------
|
||||||
|
"COMPONENT1"|Component 1
|
||||||
|
"COMPONENT2"|Component 2
|
||||||
|
"COMPOSITE1"|Composite 1
|
||||||
|
"COMPOSITE2"|Composite 2
|
||||||
|
"HDMI1"|HDMI output port 1
|
||||||
|
"HDMI2"|HDMI output port 2
|
||||||
|
"HDMI3"|HDMI output port 3
|
||||||
|
"HDMI4"|HDMI output port 4
|
||||||
|
"INPUT"|Change input
|
||||||
|
"SAT"|Satellite
|
||||||
|
"VGA"|VGA
|
||||||
|
_____________
|
||||||
|
|
||||||
|
**Volume Keys**
|
||||||
|
Key|Description
|
||||||
|
---|-----------
|
||||||
|
"VOLUME_DOWN"|Volume down
|
||||||
|
"VOLUME_UP"|Volume up
|
||||||
|
"MUTE"|Volume mute
|
||||||
|
________________
|
||||||
|
|
||||||
|
**Color Keys**
|
||||||
|
Key|Description
|
||||||
|
---|-----------
|
||||||
|
"BLUE"|Blue
|
||||||
|
"GREEN"Green
|
||||||
|
"YELLOW"|Yellow
|
||||||
|
"RED"|Red
|
||||||
|
_____________
|
||||||
|
|
||||||
|
**Other Keys**
|
||||||
|
Key|Description
|
||||||
|
---|-----------
|
||||||
|
"BACK"|Back
|
||||||
|
"CENTER"|Center
|
||||||
|
"DOWN"|Down
|
||||||
|
"END"|End
|
||||||
|
"ENTER"|Enter
|
||||||
|
"ESCAPE"|Escape
|
||||||
|
"FAST_FORWARD"|Fast forward
|
||||||
|
"HOME"|Home
|
||||||
|
"LEFT"|Left
|
||||||
|
"MENU"|Menu
|
||||||
|
"MOVE_HOME"|Move home
|
||||||
|
"PAIRING"|Pairing
|
||||||
|
"REWIND"|Rewind
|
||||||
|
"RIGHT"|Right
|
||||||
|
"SEARCH"|Search
|
||||||
|
"SETTINGS"|Settings
|
||||||
|
"SYSDOWN"|Sysdown
|
||||||
|
"SYSLEFT"|Sysleft
|
||||||
|
"SYSRIGHT"|Sysright
|
||||||
|
"SYSUP"|Sysup
|
||||||
|
"TEXT"|Text
|
||||||
|
"TOP"|Top
|
||||||
|
"UP"|Up
|
||||||
|
|
||||||
|
{% enddetails %}
|
||||||
|
|
||||||
|
You can also send other Android keys using the syntax `input keyevent {key}`, replacing `{key}` with the Android numeric key event. Refer to [Android TV KeyEvent](https://developer.android.com/reference/android/view/KeyEvent) for details.
|
||||||
|
|
||||||
|
**Example to send sequence of commands:**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
service: remote.send_command
|
||||||
|
target:
|
||||||
|
device_id: 12345f9b4c9863e28ddd52c87dcebe05
|
||||||
|
data:
|
||||||
|
command:
|
||||||
|
- MENU
|
||||||
|
- RIGHT
|
||||||
|
- UP
|
||||||
|
- UP
|
||||||
|
- ENTER
|
||||||
|
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user