From e45c4971c888b3778621e499ed95df6b7c71b775 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 3 Mar 2019 16:57:12 -0800 Subject: [PATCH] Document 'firetv.adb_command' service (#8722) * Document 'media_player.firetv_adb_cmd' service * Change 'ENTER' to 'CENTER' * Rename 'cmd' to 'command' * Change 'media_player.firetv_adb_command' to 'firetv.adb_command' * Address reviewer comments --- .../_components/media_player.firetv.markdown | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index 3078d45b9bd..e695737b0ce 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -117,3 +117,36 @@ If you receive the error message `Issue: Error while setting up platform firetv` 3. Home Assistant does not have the appropriate permissions for the `adbkey` file and so it is not able to use it. Once you fix the permissions, the component should work. 4. You are already connected to the Fire TV via ADB from another device. Only one device can be connected, so disconnect the other device, restart the Fire TV (for good measure), and then restart Home Assistant. + + +## {% linkable_title Service %} + +The service `firetv.adb_command` allows you to send either keys or ADB shell commands to the Fire TV. + +| Service data attribute | Optional | Description | +| ---------------------- | -------- | ----------- | +| `entity_id` | no | Name(s) of Fire TV entities. +| `command` | no | Either a key command or an ADB shell command. + +In an [action](/getting-started/automation-action/) of your [automation setup](/getting-started/automation/) it could look like this: + +```yaml +action: + service: firetv.adb_command + data: + entity_id: media_player.fire_tv_living_room + command: "HOME" +``` + +Available key commands are: + +* `POWER` +* `SLEEP` +* `HOME` +* `UP` +* `DOWN` +* `LEFT` +* `RIGHT` +* `CENTER` +* `BACK` +* `MENU`