Apple tv remote implementation

As of tvos13 the internal integration is not more suitable to use and bricked

@postlund is already making a new version of it and it works great (thumbs up!!!)

I will not cover the installation because postlund’s github provides enough information about that
For people who want to have a remote in their lovelace, here it is
i know we could do it with fewer lines buth for reproductions this was a bether solution

automation.yaml

- id: '1588893016815'
  alias: menu klik
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: menu
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command
- id: '1588893454390'
  alias: left klik
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: left
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command
- id: '1588893677501'
  alias: right.click
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: right
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command
- id: '1588894393629'
  alias: up.click
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: up
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command
- id: '1588894418468'
  alias: down.click
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: down
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command
- id: '1588896133904'
  alias: enter.click
  description: ''
  trigger: []
  condition: []
  action:
  - data:
      command: select
      entity_id: remote.[your_entity]
    entity_id: remote.[your_entity]
    service: remote.send_command

lovelace-ui.yaml (make a view with a manual card)
cards:

      - entity: media_player.[your_player]
        type: media-control
      - entities:
          - media_player.[your_player]
        show_header_toggle: false
        type: entities
      - entity: media_player.[your_player]
        type: media-control
      - cards:
          - cards:
              - entity: remote.[your_entity]
                hold_action:
                  action: none
                icon: 'mdi:arrow-left'
                name: Left knop
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.left_click
                type: button
              - entity: remote.[your_entity]
                hold_action:
                  action: none
                icon: 'mdi:apple'
                name: Enter klik
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.enter_click
                type: button
              - entity: remote.[your_entity]
                hold_action:
                  action: none
                icon: 'mdi:arrow-right'
                name: Right klik
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.right_click
                type: button
            type: horizontal-stack
          - cards:
              - entity: remote.[your_entity]
                hold_action:
                  action: none
                icon: 'mdi:arrow-up'
                name: up knop
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.up_click
                type: button
              - entity: remote.[your_entity]
                hold_action:
                  action: none
                icon: 'mdi:menu'
                name: Menu knop
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.menu_click
                type: button
              - entity: remote.kamer_bas
                hold_action:
                  action: none
                icon: 'mdi:arrow-down'
                name: down knop
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: automation.trigger
                  service_data:
                    entity_id: automation.down_click
                type: button
            type: horizontal-stack
        type: vertical-stack

eventually it will look like this
image

5 Likes

@Matthi_Trb This was a great help to me! It looks like the automations aren’t required to just get the remote card. I took what you did and modified it:

    cards:
      - entity: media_player.master_bedroom_apple_tv
        type: media-control
      - cards:
          - cards:
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:arrow-left'
                name: Left arrow
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: left
                    entity_id: remote.master_bedroom
                type: button
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:apple'
                name: Select
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: select
                    entity_id: remote.master_bedroom
                type: button
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:arrow-right'
                name: Right arrow
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: right
                    entity_id: remote.master_bedroom
                type: button
            type: horizontal-stack
          - cards:
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:arrow-up'
                name: Up arrow
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: up
                    entity_id: remote.master_bedroom
                type: button
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:menu'
                name: Menu
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: menu
                    entity_id: remote.master_bedroom
                type: button
              - entity: remote.master_bedroom
                hold_action:
                  action: none
                icon: 'mdi:arrow-down'
                name: Down arrow
                show_icon: true
                show_name: false
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: down
                    entity_id: remote.master_bedroom
                type: button
            type: horizontal-stack
          - type: horizontal-stack
            cards:
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: home
                    entity_id: remote.master_bedroom
                hold_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: home_hold
                    entity_id: remote.living_room
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                icon: 'mdi:home'
                name: Home
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: suspend
                    entity_id: remote.master_bedroom
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                name: Sleep
                icon: 'mdi:sleep'
                hold_action:
                  action: none
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: volume_up
                    entity_id: remote.master_bedroom
                hold_action:
                  action: none
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                name: Volume up
                icon: 'mdi:volume-plus'
          - type: horizontal-stack
            cards:
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: play_pause
                    entity_id: remote.master_bedroom
                hold_action:
                  action: none
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                name: Play/Pause
                icon: 'mdi:play-pause'
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: next
                    entity_id: remote.master_bedroom
                hold_action:
                  action: none
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                icon: 'mdi:skip-next'
                name: Next
              - type: button
                tap_action:
                  action: call-service
                  service: remote.send_command
                  service_data:
                    command: volume_down
                    entity_id: remote.master_bedroom
                hold_action:
                  action: none
                show_icon: true
                show_name: false
                entity: remote.master_bedroom
                name: Volume down
                icon: 'mdi:volume-minus'
        type: vertical-stack

Mine looks like this:


The volume buttons are only able to control my volume on devices that I have configured to use HDMI CEC for volume control. Thanks @postlund for help in sorting that out.

7 Likes

@celawlor I responded in the issue :+1:

1 Like

thank you sir! Happy you made an even better version!!

I’m wondering if someone can guide me in the right direction. I tried adding the config from celawlor above into a empty a Lovelace dashboard and I can’t get it to work properly. What tags/levels need to be in the raw configuration before the first “cards:” tag?

Currently I have:

views:
  - path: apple-tv-remote
    title: APPLE TV REMOTE
  - cards:
      - cards:
          - entity: media_player.master_bedroom_apple_tv

And my “Apple Tv Remote” view is empty, but a Unnamed View appears with the buttons on it (but not formatted nicely).

Thanks in advance for any assistance.

Hi, guys. I have been trying to figure out the command that calls the menu to configure subtitles / audio / speakers settings. I thought it would be easy, but I could not find the information anywhere. Can anybody help me on that? Thanks in advance!

1 Like

I’m actually trying to set this up and am totally lost. Could someone help point me in the right direction.

Try adding this to a manual card, I haven’t fully tested the buttons.

cards:
  - entity: media_player.living_room
    type: media-control
  - cards:
      - cards:
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:arrow-left'
            name: Left Arrow
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: left
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:apple'
            name: Select
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: select
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:arrow-right'
            name: Right Arrow
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: right
                entity_id: remote.living_room
        type: horizontal-stack
      - cards:
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:arrow-up'
            name: Up Arrow
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: up
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:menu'
            name: Menu
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: menu
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:arrow-down'
            name: Down Arrow
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: down
                entity_id: remote.living_room
        type: horizontal-stack
      - cards:
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:home'
            name: Home
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: home
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: home_hold
                entity_id: remote.living_room
            icon: 'mdi:sleep'
            name: Sleep
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: menu
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:volume-plus'
            name: Volume Up
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: volume_up
                entity_id: remote.living_room
        type: horizontal-stack
      - cards:
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:play-pause'
            name: Play/Pause
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: play_pause
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:skip-next'
            name: Next
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: next
                entity_id: remote.living_room
          - entity: remote.living_room
            type: button
            hold_action:
              action: none
            icon: 'mdi:volume-minus'
            name: Volume Down
            show_icon: true
            show_name: false
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: volume_down
                entity_id: remote.living_room
        type: horizontal-stack
    type: vertical-stack
type: vertical-stack

1 Like

You are awesome - Thank you!

ok so i got it all to work except the volume any one have any ideas?

Volume needs to be set up properly with CEC on the device in order to work.

How do I go about doing that?

Hi Pierre,

I was just wondering if it would be possible to launch apps via this integration. Here is where I got for the moment.

but would like to have something similar as what I have for my FireTV which looks like

No, it’s currently not possible. Support for another protocol called companion is needed for this. Apple just couldn’t settle with one protocol now, could they?

Of course not, someone needs to confuse the Russians. What do you think about the remote layout ?

Hello @ronwjr1973, have you ever made it work ? I have the same problem.

I’m pretty sure HDMI-CEC is enabled, since I can turn on the TV and set its volume with the real Apple TV remote but it doesn’t work when I call the remote.send_command service with volume_up :thinking:

Is this the correct way to do it ?

service: remote.send_command
  data_template:
    entity_id: remote.my_remote
    command: volume_up

Thanks in advance

service: remote.send_command
  data_template:
    entity_id: remote.my_remote
    command: 
    - volume_up

Thanks for the answer but still no luck :confused: I really don’t understand because I manage to turn on the TV sending the home command but the volume one doesn’t work !

Incredibly basic question/problem that I’m almost embarrassed to post. I’m trying to install the integration. When I put in the IP address I get this message: This device has already been configured. Please pick another device.

Any suggestions?