From fb2fd48d5c9261589f6b6e7d5789661521b9d392 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Wed, 6 Feb 2019 09:10:18 -0800 Subject: [PATCH 1/5] Document 'media_player.firetv_adb_cmd' service --- .../_components/media_player.firetv.markdown | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index 3078d45b9bd1..ec102a279f79 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -117,3 +117,21 @@ 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 %} + +A service `media_player.firetv_adb_cmd` is provided allowing you to send either keys or ADB shell commands to the Fire TV. + +```json +{ + "entity_id" : "media_player.fire_tv_living_room", + "cmd" : "HOME" +} +``` + +Service parameters: + +- **entity_id**: Name(s) of Fire TV entities. +- **cmd**: Either a key command or an ADB shell command. + - Available key commands: `POWER`, `SLEEP`, `HOME`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `ENTER`, `BACK`, or `MENU` From 48c66df4b361ea373cd7cc252459ee24477b8291 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 24 Feb 2019 11:15:36 -0800 Subject: [PATCH 2/5] Change 'ENTER' to 'CENTER' --- source/_components/media_player.firetv.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index ec102a279f79..f7484213d45d 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -134,4 +134,4 @@ Service parameters: - **entity_id**: Name(s) of Fire TV entities. - **cmd**: Either a key command or an ADB shell command. - - Available key commands: `POWER`, `SLEEP`, `HOME`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `ENTER`, `BACK`, or `MENU` + - Available key commands: `POWER`, `SLEEP`, `HOME`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `CENTER`, `BACK`, or `MENU` From 6555c44cafb4485ec4d9505d44787e4ca0937fa4 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 24 Feb 2019 16:39:27 -0800 Subject: [PATCH 3/5] Rename 'cmd' to 'command' --- source/_components/media_player.firetv.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index f7484213d45d..f2290b4b55c0 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -121,17 +121,17 @@ If you receive the error message `Issue: Error while setting up platform firetv` ## {% linkable_title Service %} -A service `media_player.firetv_adb_cmd` is provided allowing you to send either keys or ADB shell commands to the Fire TV. +A service `media_player.firetv_adb_command` is provided allowing you to send either keys or ADB shell commands to the Fire TV. ```json { "entity_id" : "media_player.fire_tv_living_room", - "cmd" : "HOME" + "command" : "HOME" } ``` Service parameters: - **entity_id**: Name(s) of Fire TV entities. -- **cmd**: Either a key command or an ADB shell command. +- **command**: Either a key command or an ADB shell command. - Available key commands: `POWER`, `SLEEP`, `HOME`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `CENTER`, `BACK`, or `MENU` From c8e908f9c282422a24407e0f1665687b40c467ea Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Tue, 26 Feb 2019 06:24:15 -0800 Subject: [PATCH 4/5] Change 'media_player.firetv_adb_command' to 'firetv.adb_command' --- source/_components/media_player.firetv.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index f2290b4b55c0..cc228c6f8151 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -121,7 +121,7 @@ If you receive the error message `Issue: Error while setting up platform firetv` ## {% linkable_title Service %} -A service `media_player.firetv_adb_command` is provided allowing you to send either keys or ADB shell commands to the Fire TV. +A service `firetv.adb_command` is provided allowing you to send either keys or ADB shell commands to the Fire TV. ```json { From 7671d4db66ca9e55a26f5612cf2584bc79ce5bd6 Mon Sep 17 00:00:00 2001 From: Jeff Irion Date: Sun, 3 Mar 2019 16:38:18 -0800 Subject: [PATCH 5/5] Address reviewer comments --- .../_components/media_player.firetv.markdown | 37 +++++++++++++------ 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/source/_components/media_player.firetv.markdown b/source/_components/media_player.firetv.markdown index cc228c6f8151..e695737b0ce2 100644 --- a/source/_components/media_player.firetv.markdown +++ b/source/_components/media_player.firetv.markdown @@ -121,17 +121,32 @@ If you receive the error message `Issue: Error while setting up platform firetv` ## {% linkable_title Service %} -A service `firetv.adb_command` is provided allowing you to send either keys or ADB shell commands to the Fire TV. +The service `firetv.adb_command` allows you to send either keys or ADB shell commands to the Fire TV. -```json -{ - "entity_id" : "media_player.fire_tv_living_room", - "command" : "HOME" -} -``` +| 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: -Service parameters: +```yaml +action: + service: firetv.adb_command + data: + entity_id: media_player.fire_tv_living_room + command: "HOME" +``` -- **entity_id**: Name(s) of Fire TV entities. -- **command**: Either a key command or an ADB shell command. - - Available key commands: `POWER`, `SLEEP`, `HOME`, `UP`, `DOWN`, `LEFT`, `RIGHT`, `CENTER`, `BACK`, or `MENU` +Available key commands are: + +* `POWER` +* `SLEEP` +* `HOME` +* `UP` +* `DOWN` +* `LEFT` +* `RIGHT` +* `CENTER` +* `BACK` +* `MENU`