DirecTV remote

Newbie just getting started. The Home Assistant DirecTV integration shows what is playing but does not allow the user to do much. Does anyone have a good DirecTV remote script/card that allows selecting menu, direction arrows, select, exit, channel up/down and number entry for changing channels?

I can see the basic info on DirecTV - Home Assistant but it is too vague / do not understand it well enough to implement.

Thanks in advance

Figured out what I was doing wrong. Did get a generic remote functional. Will post it here. If anyone has suggestions on ways to improve this then just add to the post.

type: vertical-stack
cards:
  - type: markdown
    content: '# DirecTV Remote'
  - type: grid
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: power
          target:
            entity_id: remote.lr
        name: 'On'
        icon: mdi:power
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: menu
          target:
            entity_id: remote.lr
        name: Menu
        icon: mdi:menu
  - type: grid
    cards:
      - type: horizontal-stack
        cards:
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: guide
              target:
                entity_id: remote.lr
            name: Guide
            icon: mdi:television-guide
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: up
          target:
            entity_id: remote.lr
        name: Up
        icon: mdi:arrow-up-bold
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: exit
          target:
            entity_id: remote.lr
        name: Exit
        icon: mdi:exit-run
  - type: horizontal-stack
    cards:
      - type: grid
        cards:
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: left
              target:
                entity_id: remote.lr
            name: Left
            icon: mdi:arrow-left-bold
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: select
              target:
                entity_id: remote.lr
            name: Select
            icon: mdi:checkbox-blank
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: right
              target:
                entity_id: remote.lr
            name: Right
            icon: mdi:arrow-right-bold
  - type: horizontal-stack
    cards:
      - type: grid
        cards:
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: info
              target:
                entity_id: remote.lr
            name: Info
            icon: mdi:book-account-outline
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: down
              target:
                entity_id: remote.lr
            name: Down
            icon: mdi:arrow-down-bold
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: prev
              target:
                entity_id: remote.lr
            name: Previous
            icon: mdi:keyboard-return
  - type: horizontal-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: '1'
              target:
                entity_id: remote.lr
            icon: mdi:numeric-1
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: '2'
              target:
                entity_id: remote.lr
            icon: mdi:numeric-2
          - type: button
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                command: '3'
              target:
                entity_id: remote.lr
            icon: mdi:numeric-3
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '4'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-4
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '5'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-5
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '6'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-6
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '7'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-7
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '8'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-8
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '9'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-9
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: dash
          target:
            entity_id: remote.lr
        icon: mdi:minus
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: '0'
          target:
            entity_id: remote.lr
        icon: mdi:numeric-0
      - type: button
        tap_action:
          action: toggle
        name: Enter
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: chanup
          target:
            entity_id: remote.lr
        name: Channel Up
        icon: mdi:arrow-collapse-up
      - type: button
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            command: chandown
          target:
            entity_id: remote.lr
        name: Channel Down
        icon: mdi:arrow-collapse-down

This is cool! :sunglasses:
Could you please post a screenshot to show what it looks like?

Thanks for sharing! :+1:

Again this is a very basic but functional remote. Need to learn more before doing more advanced features.

1 Like

Hey srivers,

I like what you did here. I’m trying to do something similar. I want to take this to the next level and have channel icons and then when you press that it sends the channel numbers. Have you figured out how to do more than one command at a time?

I’m a newbie, so I’m going to have some stupid questions. I’m assuming you put the above mentioned code in your configuration yaml?

EDIT: Actually, I figured it out. If you enter the commands like this:

  • type: button
    tap_action:
    action: call-service
    service: remote.send_command
    service_data:
    command:
    - 2
    - 0
    - 6
    - enter

You can create favorite stations, etc.

teejimenez,

I took what you provided and updated the original. Thank you for the input. I am still learning so it is a process. I included 6 channel buttons at the top (required using custom button card for the pics). The images I have to find a better way to adjust the size.

type: vertical-stack
cards:

  • type: markdown
    content: ‘# DirecTV Remote’
  • type: grid
    cards:
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: power
      target:
      entity_id: remote.lr
      name: ‘On’
      icon: mdi:power
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: menu
      target:
      entity_id: remote.lr
      name: Menu
      icon: mdi:menu
      square: false
  • type: horizontal-stack
    cards:
    • type: custom:button-card
      entity_picture: /local/Icons/nbc.png
      show_entity_picture: true
      size: 100%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 2
      - enter
    • type: custom:button-card
      entity_picture: /local/Icons/cbs.png
      show_entity_picture: true
      size: 100%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 6
      - enter
    • type: custom:button-card
      entity_picture: /local/Icons/abc.png
      show_entity_picture: true
      size: 100%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 9
      - enter
  • type: horizontal-stack
    cards:
    • type: custom:button-card
      entity_picture: /local/Icons/FOX.jpeg
      show_entity_picture: true
      size: 80%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 3
      - 5
      - enter
    • type: custom:button-card
      entity_picture: /local/Icons/espn2.jpeg
      show_entity_picture: true
      size: 105%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 2
      - 0
      - 6
      - enter
    • type: custom:button-card
      entity_picture: /local/Icons/nfl3.JPG
      show_entity_picture: true
      size: 65%
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      entity_id: remote.lr
      command:
      - 2
      - 1
      - 2
      - enter
  • type: grid
    cards:
    • type: horizontal-stack
      cards:
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: guide
        target:
        entity_id: remote.lr
        name: Guide
        icon: mdi:television-guide
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: up
      target:
      entity_id: remote.lr
      name: Up
      icon: mdi:arrow-up-bold
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: exit
      target:
      entity_id: remote.lr
      name: Exit
      icon: mdi:exit-run
      square: false
  • type: horizontal-stack
    cards:
    • type: grid
      cards:
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: left
        target:
        entity_id: remote.lr
        name: Left
        icon: mdi:arrow-left-bold
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: select
        target:
        entity_id: remote.lr
        name: Select
        icon: mdi:checkbox-blank
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: right
        target:
        entity_id: remote.lr
        name: Right
        icon: mdi:arrow-right-bold
        square: false
  • type: horizontal-stack
    cards:
    • type: grid
      cards:
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: info
        target:
        entity_id: remote.lr
        name: Info
        icon: mdi:book-account-outline
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: down
        target:
        entity_id: remote.lr
        name: Down
        icon: mdi:arrow-down-bold
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: prev
        target:
        entity_id: remote.lr
        name: Previous
        icon: mdi:keyboard-return
        square: false
  • type: horizontal-stack
    cards:
    • type: horizontal-stack
      cards:
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: ‘1’
        target:
        entity_id: remote.lr
        icon: mdi:numeric-1
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: ‘2’
        target:
        entity_id: remote.lr
        icon: mdi:numeric-2
      • type: button
        tap_action:
        action: call-service
        service: remote.send_command
        service_data:
        command: ‘3’
        target:
        entity_id: remote.lr
        icon: mdi:numeric-3
  • type: horizontal-stack
    cards:
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘4’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-4
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘5’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-5
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘6’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-6
  • type: horizontal-stack
    cards:
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘7’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-7
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘8’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-8
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘9’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-9
  • type: horizontal-stack
    cards:
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: dash
      target:
      entity_id: remote.lr
      icon: mdi:minus
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: ‘0’
      target:
      entity_id: remote.lr
      icon: mdi:numeric-0
    • type: button
      tap_action:
      action: toggle
      name: Enter
  • type: horizontal-stack
    cards:
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: chanup
      target:
      entity_id: remote.lr
      name: Channel Up
      icon: mdi:arrow-collapse-up
      icon_height: 50px
    • type: button
      tap_action:
      action: call-service
      service: remote.send_command
      service_data:
      command: chandown
      target:
      entity_id: remote.lr
      name: Channel Down
      icon: mdi:arrow-collapse-down
      icon_height: 50px

Thanks! Yes, that’s what I’m trying to do. Eventually, I want to get rid of the numeric pad altogether and just have a bunch of icons that show my favorite stations.

I’m a newbie too, so trying to understand how all of it works. Keep up the good work.

@srivers12 - I am just starting out with home assistant and tried to copy your code to create a remote for direct tv but all i get is “unnamed view” errors. I was wondering if you can post your code so i can copy it. Also would need help figuring out what card to start with. I appreciate any help as i am trying to learn as much as i can about home assistant.

Brian

While this is not the solution above, I posted all my code for DirecTV and Vizio Smartcast TVs here:

1 Like

Can anyone tell me the host name?