Android TV Remote: Document sending text (#39760)

This commit is contained in:
tronikos 2025-06-29 05:23:23 -07:00 committed by GitHub
parent d484e27ce0
commit 869025ce28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,7 +156,7 @@ media_player:
## Remote
The remote allows you to send key commands to your Android TV device with the `remote.send_command` action.
The remote allows you to send key commands and text as input to your Android TV device with the `remote.send_command` action.
The entity has the `current_activity` attribute that shows the current foreground app on the Android TV.
You can pass the application ID shown in this `current_activity` as `activity` in the `remote.turn_on` action to launch that app.
@ -242,6 +242,8 @@ Other:
{% enddetails %}
To send text as keyboard input use the `remote.send_command` and prefix the text to send with `text:`, e.g. `command: text:hello world` to type "hello world" in the selected input field.
If `activity` is specified in `remote.turn_on` it will open the specified URL or the application with the given package name. See [Launching apps section](#launching-apps).
Example actions:
@ -265,6 +267,15 @@ target:
entity_id: remote.living_room_tv
```
```yaml
# Send "Never Gonna Give You Up" as keyboard input text to the selected input field
action: remote.send_command
data:
command: text:Never Gonna Give You Up
target:
entity_id: remote.living_room_tv
```
```yaml
# Launch YouTube
action: remote.turn_on