Share your Lovelace Home Theater Remote Setup

I didn’t, it’s just a regular glance card nested inside of an entities card (for the top TV switch) but you could also use a vertical stack card for that.

All the buttons are just scripts with mdi icons. So I have multiple entries in a glance card like this:

- entity: script.tvsmartmenu
  icon: 'mdi:home'
  tap_action:
    action: call-service
    service: script.tvsmartmenu

These scripts call out a broadlink service to send an infrared command.

The white spaces are done by making a script and giving it a non-existing icon + empty character as friendly name. Inside my scripts.yaml:

empty:
  sequence:
  - data: {}
    entity_id: script.justsomerandomtext
    service: script.turn_on

Inside customize.yaml:

script.empty:
  friendly_name: ‏‏‎ ‎
  icon: mdi:justsomerandomtext

Combine all of that and you get something like this https://hastebin.com/eyokeyahif.sql (top part of the screenshot I posted)

Hi, I’m trying to make a simple card with some buttons to control volume via Harmony:

I’ve tried to follow some of the examples in this thread, but am stuck with an error I can’t figure out:

This is the code I have in a new card in my Overview:

And basically, I just want a button to push for volume up and one for volume down. I specified “binary_sensor.mudroom_motion” because I was trying to mimic another example in this thread…also when I do this, I see the caption of “Mudroom Sensor” above the icons…how do I remove?

Thank you!

type: glance
entities:

  • entity: binary_sensor.mudroom_motion
    tap_action:
    action: call-service
    service: remote.send_command
    service_data:
    entity_id: remote.Living_Room_Hub
    device: Audio Research Amp
    command: VolumeUp
    hold_action:
    action: call-service
    service: remote.send_command
    service_data:
    entity_id: remote.Living_Room_Hub
    device: Audio Research Amp
    command: VolumeUp
    show_icon: true
    show_name: false
    show_state: false
    icon_height: 50px
    icon: ‘mdi:volume-plus’
  • entity: binary_sensor.mudroom_motion
    tap_action:
    action: call-service
    service: remote.send_command
    service_data:
    entity_id: remote.Living_Room_Hub
    device: Audio Research Amp
    command: VolumeDown
    hold_action:
    action: call-service
    service: remote.send_command
    service_data:
    entity_id: remote.Living_Room_Hub
    device: Audio Research Amp
    command: VolumeDown
    show_icon: true
    show_name: false
    show_state: false
    icon_height: 50px
    icon: ‘mdi:volume-minus’

It’s a bit hard to tell without code formatting, but here is an example of my Volume Up button that trigger a script that calls a broadlink service:

        entity: script.sony_volume_down
        icon: 'mdi:volume-medium'
        name: +
        show_name: false
        state:
          - color: 'rgb(255, 0, 0)'
            value: 'on'
        styles:
          card:
            - height: 50px
          icon:
            - color: 'rgb(255,255,255)'
        tap_action:
          action: call-service
          service: script.sony_volume_down
        type: 'custom:button-card'

The rest of the setup is on my GitHub

Thanks to everyone for your ideas. I ended up taking several ideas from ThaNerd and creating my own. Thanks ThaNerd!

However, I am wondering, has anyone figured out how to create a keyboard entry for the remotes. For example, when I search for a clip on Netflix or YouTube, instead of choosing each letter, has anyone created a keyboard-entry-remote-card to enter in search terms?

Thanks for all your great ideas!

Hi Jim, i am currently figuring out my apple remote card, now i have to cards, both work. How did you create the selection bar, also, could you share your config for this? MUCH appreciated… Bedankt alvast!

@mroffbeat Visit my github here https://github.com/jimz011/homekit-infused
Chose my personal branch to find all the code I have used.

Here is mine, I had to split it over several posts as it is too big for one post.

I also created a new forum topic about sharing Broadlink IR/RF codes,
you can find the Broadlink codes of these remotes there

I put 4 remotes in one, and with a dropdown selection and a conditional card, I select which one I want to see.
The first 2 rows that are used to switch devices on or off, and to select the input on my receiver are always shown, the others are shown depending on the selection box.

Here is the lovelace code, I’ll post it over several posts as it seems to be too big for one post.
These are the first 3 rows of the vertical stack, they are always visible :

  • The dropdown box
  • Power on/off buttons for the different elements
  • Input select buttons of the receiver/power amplifier.
type: vertical-stack
cards:
  - type: entities
    entities:
      - input_select.dropdown1234
    show_header_toggle: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.hifikast_s2
        name: HiFikast
        show_icon: true
        icon: 'hass:speaker'
        show_state: false
      - type: button
        name: Audio
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: receiveronoff
          target: {}
        icon: 'hass:volume-high'
      - type: button
        name: TV
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: Orange
            command: tvonoff
        icon: 'hass:television-box'
      - type: button
        name: Emtec
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: EmtecD850H
            command: onoff
        icon: 'hass:filmstrip'
      - type: button
        name: Orange
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: Orange
            command: decoderonoff
        icon: 'hass:power'
  - type: horizontal-stack
    cards:
      - type: button
        name: EMTEC
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: bddvd
          target: {}
        icon: 'hass:video'
        icon_height: 25px
        show_icon: false
      - type: button
        name: kabel
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: satcatv
          target: {}
        icon: 'hass:tv'
        icon_height: 25px
        show_icon: false
      - type: button
        name: RASP1
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: game
          target: {}
        icon: 'hass:home'
        icon_height: 25px
        show_icon: false
      - type: button
        name: /
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: sacd
          target: {}
        icon: 'hass:axis-arrow'
        icon_height: 25px
        show_icon: false
      - type: button
        name: USB
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: usb
          target: {}
        icon: 'hass:backspace'
        icon_height: 25px
        show_icon: false
      - type: button
        name: TV
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.rmproplus_remote
            device: strdn1050
            command: tv
          target: {}
        icon: 'hass:exit-run'
        icon_height: 25px
        show_icon: false

And the Emtec moviebox part

  - type: conditional
    conditions:
      - entity: input_select.dropdown1234
        state: Emtec-Moviecube-D850H
    card:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: button
              name: DVD
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: dvd
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: Eject
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: eject
                target: {}
              icon: 'hass:monitor-dashboard'
              icon_height: 25px
              show_icon: false
            - type: button
              name: USB
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: usb
                target: {}
              icon: 'hass:exit-run'
              icon_height: 25px
              show_icon: false
            - type: button
              name: Home
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: home
                target: {}
              icon: 'hass:home'
              icon_height: 25px
            - type: button
              name: Options
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: options
                target: {}
              icon: 'hass:axis-arrow'
              icon_height: 25px
            - type: button
              name: Back
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: return
                target: {}
              icon: 'hass:backspace'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: vol+
              icon: 'hass:volume-plus'
              icon_height: 25px
            - type: button
              name: Setup
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: setup
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: up
              icon: 'hass:arrow-up-bold'
              icon_height: 25px
            - type: button
              name: Beeld
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: tvsys
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: Audio
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: audio
                target: {}
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: mute
              icon: 'hass:volume-off'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: left
              icon: 'hass:arrow-left-bold'
              icon_height: 25px
            - type: button
              name: OK
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: ok
                target: {}
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: right
              icon: 'hass:arrow-right-bold'
              icon_height: 25px
            - type: button
              name: SUBtitle
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: subtitle
                target: {}
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: vol-
              icon: 'hass:volume-minus'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: previous
              icon: 'hass:skip-backward'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: down
              icon: 'hass:arrow-down-bold'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: next
              icon: 'hass:skip-forward'
              icon_height: 25px
            - type: button
              name: Zoom
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: zoom
                target: {}
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: stop
              icon: 'hass:square'
              icon_height: 20px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: rewind
              icon: 'hass:step-backward-2'
              icon_height: 25px
            - type: button
              name: PLAY
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: playpauze
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: play2
              icon: 'hass:step-forward'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: forward
              icon: 'hass:step-forward-2'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: hart
              icon: 'hass:heart'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 1
              icon: 'hass:numeric-1-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 2
              icon: 'hass:numeric-2-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 3
              icon: 'hass:numeric-3-box'
              icon_height: 25px
            - type: button
              name: Search
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: search
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 4
              icon: 'hass:numeric-4-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 5
              icon: 'hass:numeric-5-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 6
              icon: 'hass:numeric-6-box'
              icon_height: 25px
            - type: button
              name: COPY
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: copy
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 7
              icon: 'hass:numeric-7-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 8
              icon: 'hass:numeric-8-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 9
              icon: 'hass:numeric-9-box'
              icon_height: 25px
            - type: button
              name: SELECT
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: select
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: record
              icon: 'hass:video'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: 0
              icon: 'hass:numeric-0-box'
              icon_height: 25px
            - type: button
              name: HELP
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: help
                target: {}
              icon_height: 25px
              show_icon: false
            - type: button
              name: INFO
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: EmtecD850H
                  command: info
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
1 Like

Here is the part of the Orange digicorder remote, it is shown when I select Orange in the dropdown selection box.

  - type: conditional
    conditions:
      - entity: input_select.dropdown1234
        state: Orange
    card:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: button
              name: Gids
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: tvgids
              icon: 'hass:monitor-eye'
              icon_height: 25px
            - type: button
              name: OPN
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: opnames
              icon: 'hass:monitor-dashboard'
              icon_height: 25px
            - type: button
              name: Menu
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: home
              icon: 'hass:home'
              icon_height: 25px
            - type: button
              name: Options
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: opt
              icon: 'hass:axis-arrow'
              icon_height: 25px
            - type: button
              name: Back
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: back
              icon: 'hass:backspace'
              icon_height: 25px
            - type: button
              name: Exit
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: exit
              icon: 'hass:exit-run'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: vol+
              icon: 'hass:volume-plus'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: up
              icon: 'hass:arrow-up-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: CH+
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: ch+
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: soundonoff
              icon: 'hass:volume-off'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: left
              icon: 'hass:arrow-left-bold'
              icon_height: 25px
            - type: button
              name: OK
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: ok
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: right
              icon: 'hass:arrow-right-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: vol-
              icon: 'hass:volume-minus'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: down
              icon: 'hass:arrow-down-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: CH-
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: ch-
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: stop
              icon: 'hass:square'
              icon_height: 20px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: rewind
                  num_repeats: 4
              icon: 'hass:step-backward-2'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: rewind
              icon: 'hass:step-backward'
              icon_height: 25px
            - type: button
              name: PLAY
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: playpauze
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: forward
              icon: 'hass:step-forward'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: forward
                  num_repeats: 4
              icon: 'hass:step-forward-2'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 1
              icon: 'hass:numeric-1-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 2
              icon: 'hass:numeric-2-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 3
              icon: 'hass:numeric-3-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 4
              icon: 'hass:numeric-4-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 5
              icon: 'hass:numeric-5-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 6
              icon: 'hass:numeric-6-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 7
              icon: 'hass:numeric-7-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 8
              icon: 'hass:numeric-8-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 9
              icon: 'hass:numeric-9-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: record
              icon: 'hass:video'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: 0
              icon: 'hass:numeric-0-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: Orange
                  command: delete
              icon: 'hass:trash-can-outline'
              icon_height: 25px

Here is the part of the Sony STR-DN1050 receiver remote, it is shown when I select Orange in the dropdown selection box.

  - type: conditional
    conditions:
      - entity: input_select.dropdown1234
        state: STRDN1050
    card:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: vol+
              icon: 'hass:volume-plus'
              icon_height: 25px
            - type: button
              name: Display
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: display
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: up
              icon: 'hass:arrow-up-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: ampmenu
              name: AMP
              show_icon: false
            - type: button
              name: 2CH
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: afd2ch
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: mute
              icon: 'hass:volume-off'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: left
              icon: 'hass:arrow-left-bold'
              icon_height: 25px
            - type: button
              name: OK
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: ok
                target: {}
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: right
              icon: 'hass:arrow-right-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: movie
                target: {}
              entity: remote.rmproplus_remote
              name: Movie
              show_icon: false
              show_state: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: vol-
              icon: 'hass:volume-minus'
              icon_height: 25px
            - type: button
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: return
                target: {}
              entity: remote.rmproplus_remote
              name: Back
              show_icon: false
              show_state: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: down
              icon: 'hass:arrow-down-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: options
              entity: remote.rmproplus_remote
              name: OPT
              show_icon: false
              show_state: false
            - type: button
              name: Music
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: music
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: rewind
              icon: 'hass:step-backward-2'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: stop
              icon: 'hass:square'
              icon_height: 20px
            - type: button
              name: PLAY
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: playpauze
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: forward
              icon: 'hass:step-forward-2'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: Home
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: home
              icon: 'hass:home'
              icon_height: 25px
            - type: button
              name: Watch
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: watch
            - type: button
              name: Listen
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: listen
            - type: button
              name: HDMIout
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: strdn1050
                  command: hdmioutput

and the Sony TV-KDL60W855b part

  - type: conditional
    conditions:
      - entity: input_select.dropdown1234
        state: TV-KDL60W855b
    card:
      type: vertical-stack
      cards:
        - type: horizontal-stack
          cards:
            - type: button
              name: Input
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: inputselect
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: APPS
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: apps
                target: {}
              icon: 'hass:monitor-dashboard'
              icon_height: 25px
              show_icon: false
            - type: button
              name: Home
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: home
                target: {}
              icon: 'hass:home'
              icon_height: 25px
            - type: button
              name: Options
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: options
                target: {}
              icon: 'hass:axis-arrow'
              icon_height: 25px
            - type: button
              name: Back
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: return
                target: {}
              icon: 'hass:backspace'
              icon_height: 25px
            - type: button
              name: Exit
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: exit
                target: {}
              icon: 'hass:exit-run'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: vol+
              icon: 'hass:volume-plus'
              icon_height: 25px
            - type: button
              name: Discov
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: discover
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: up
              icon: 'hass:arrow-up-bold'
              icon_height: 25px
            - type: button
              name: Smenu
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: syncmenu
                target: {}
              icon: 'hass:monitor-eye'
              icon_height: 25px
              show_icon: false
            - type: button
              name: CH+
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: ch+
                target: {}
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: mute
              icon: 'hass:volume-off'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: left
              icon: 'hass:arrow-left-bold'
              icon_height: 25px
            - type: button
              name: OK
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: ok
                target: {}
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: right
              icon: 'hass:arrow-right-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: vol-
              icon: 'hass:volume-minus'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: down
              icon: 'hass:arrow-down-bold'
              icon_height: 25px
            - type: button
              tap_action:
                action: none
              entity: remote.rmproplus_remote
              name: .
              show_icon: false
              show_state: false
            - type: button
              name: CH-
              show_icon: false
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: ch-
                target: {}
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: stop
              icon: 'hass:square'
              icon_height: 20px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: rewind
              icon: 'hass:step-backward-2'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: rewind
              icon: 'hass:step-backward'
              icon_height: 25px
            - type: button
              name: PLAY
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: play
                target: {}
              icon: 'hass:play-circle-outline'
              icon_height: 25px
              show_icon: false
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: forward
              icon: 'hass:step-forward'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: forward
              icon: 'hass:step-forward-2'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 1
              icon: 'hass:numeric-1-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 2
              icon: 'hass:numeric-2-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 3
              icon: 'hass:numeric-3-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 4
              icon: 'hass:numeric-4-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 5
              icon: 'hass:numeric-5-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 6
              icon: 'hass:numeric-6-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 7
              icon: 'hass:numeric-7-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 8
              icon: 'hass:numeric-8-box'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 9
              icon: 'hass:numeric-9-box'
              icon_height: 25px
        - type: horizontal-stack
          cards:
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: record
              icon: 'hass:video'
              icon_height: 25px
            - type: button
              name: null
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: 0
              icon: 'hass:numeric-0-box'
              icon_height: 25px
            - type: button
              name: Manual
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.rmproplus_remote
                  device: TV-KDL60W855b
                  command: imanual
              icon_height: 25px
              show_icon: false

I recently updated my entertainment view to also use conditional cards and a selector. I found the selector as a dropdown list quite annoying and thought it should just be another “remote button”. So, I opted for the custom:state-switch card instead of the built-in one and custom:button-card for the selector buttons.

Selector buttons:

      - type: horizontal-stack
        cards:
          - type: custom:button-card
            template: remote
            variables:
              selection: TV
            icon: mdi:television
          - type: custom:button-card
            template: remote
            variables:
              selection: Audio
            icon: mdi:audio-video
          - type: custom:button-card
            template: remote
            variables:
              selection: Apple TV
            icon: mdi:apple
          - type: custom:button-card
            template: remote
            variables:
              selection: Satellite
            icon: mdi:set-top-box

Button template:

  remote:
    variables:
      selection: "Remote State"
    entity: input_select.selected_remote
    name: "[[[ return variables.selection ]]]"
    size: 50%
    color_type: icon
    styles:
    styles:
      name:
        - color: var(--paper-item-icon-color)
      label:
        - color: var(--paper-item-icon-color)
        - padding-left: 1ex
      card:
        - font-size: 12px
      icon:
        - color: |
            [[[
              if (entity.state == variables.selection) {
                return 'var(--paper-item-icon-active-color)';
              } else  {
                return 'var(--paper-item-icon-color)';
              }
            ]]]
    tap_action:
      action: call-service
      haptic: light
      service: input_select.select_option
      service_data:
        entity_id: input_select.selected_remote
        option: "[[[ return variables.selection ]]]"
3 Likes

This for me, Google is the workhorse in my house. I have routines setup to turn on everything in my theater room just the way I want it with a Hue scene and dimmed to the right level (and turn off when I am done). Additionally, they now recognize the room you are sending a command from so I can just say play or pause and it does it.

My main attraction to Home assistant was the drive to be able to control lights while watching movies as I use the remote just for those activities to minimize disruption by trying to yell commands at Google while Arnold is in the background blowing up terminators (haha). Although a lot of these dashboards I admit are beautiful I do not think I would ever have a use case for them. Now though I can hit play/pause/stop on Harmony and the lights dim, turn off, or turn on based off of that and I love it :slight_smile:

My remote

type: custom:stack-in-card
mode: vertical
cards:
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        styles:
          card:
            - height: 50px
            - margin: 0px
      - type: custom:button-card
        styles:
          card:
            - height: 50px
            - margin: 0px
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: TvPower
        entity: remote.sony_bravia_tv
        name: Power
        icon: mdi:power
        show_name: false
        show_state: true
        show_entity_picture: false
        show_icon: true
        styles:
          card:
            - height: 50px
            - margin: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px 0px 0px 0px
          state:
            - font-size: 12px
            - font-family: Sans-serif
            - font-color: rgba(255, 0, 0, 0.8)
            - text-transform: capitalize
            - margin: '-10px 0px -12px 0px'
          icon:
            - color: orange
            - width: 50px
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num1
        name: '1'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num2
        name: '2'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num3
        name: '3'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num4
        name: '4'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num5
        name: '5'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num6
        name: '6'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num7
        name: '7'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num8
        name: '8'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num9
        name: '9'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Display
        name: Info
        icon: mdi:information-outline
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 27px
            - margin: 0px
            - color: '#31759b'
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num0
        name: '0'
        show_name: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Teletext
        name: Teletext
        icon: mdi:text-box-outline
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 27px
            - margin: 0px
            - color: green
  - type: custom:gap-card
    height: 15
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Red
        name: Red
        icon: mdi:card
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 30px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 30px
            - margin: 0px
            - color: red
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Green
        name: Green
        icon: mdi:card
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 30px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 30px
            - margin: 0px
            - color: green
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Yellow
        name: Yellow
        icon: mdi:card
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 30px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 30px
            - margin: 0px
            - color: yellow
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Blue
        name: Blue
        icon: mdi:card
        show_name: false
        show_icon: true
        styles:
          card:
            - height: 30px
            - margin: 0px
          name:
            - font-size: 12px
            - font-family: Sans-serif
            - margin-bottom: 0px
          img_cell:
            - align-self: start
            - position: relative
            - margin: 0px
          icon:
            - width: 30px
            - margin: 0px
            - color: blue
  - type: entities
    entities:
      - type: divider
  - type: vertical-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: EPG
            name: Guide
            icon: mdi:television-guide
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 32px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 30px
                - margin: 0px
                - color: '#31759b'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: none
            name: Voice Command
            icon: mdi:microphone-outline
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              state:
                - font-size: 12px
                - font-family: Sans-serif
                - font-color: rgba(255, 0, 0, 0.8)
                - text-transform: capitalize
                - margin: 0px
              icon:
                - width: 35px
                - color: '#46545c'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: OneTouchView
            name: Rec List
            icon: mdi:record
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 32px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 32px
                - margin: 0px
                - color: '#31759b'
      - type: custom:gap-card
        height: 25
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Input
            name: Input
            icon: mdi:application-import
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 30px
                - margin-bottom: 1px
                - color: '#46545c'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Up
            name: Up
            icon: mdi:arrow-up
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              state:
                - font-size: 12px
                - font-family: Sans-serif
                - font-color: rgba(255, 0, 0, 0.8)
                - text-transform: capitalize
                - margin: 0px
              icon:
                - width: 60px
                - color: '#7290aa'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Options
            name: Menu
            icon: mdi:cog-outline
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 34px
                - margin: 0px
                - color: '#46545c'
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Left
            name: Left
            icon: mdi:arrow-left
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Confirm
            name: OK
            icon: mdi:crosshairs
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - font-weight: bold
                - margin: 21px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              state:
                - font-size: 12px
                - font-family: Sans-serif
                - font-color: rgba(255, 0, 0, 0.8)
                - text-transform: capitalize
                - margin: 0px
              icon:
                - width: 35px
                - color: '#516377'
                - margin: 0px
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Right
            name: Right
            icon: mdi:arrow-right
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Return
            name: BACK
            icon: mdi:undo-variant
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 60px
                - margin: 10px 0px 0px 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - font-weight: bold
                - margin: 40px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 40px
                - margin: 0px
                - color: '#46545c'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Down
            name: Down
            icon: mdi:arrow-down
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              state:
                - font-size: 12px
                - font-family: Sans-serif
                - font-color: rgba(255, 0, 0, 0.8)
                - text-transform: capitalize
                - margin: 0px
              icon:
                - width: 55px
                - color: '#7290aa'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Home
            name: HOME
            icon: mdi:home
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 60px
                - margin: 10px 0px 0px 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - font-weight: bold
                - margin: 40px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 40px
                - margin: 0px
                - color: '#46545c'
      - type: custom:gap-card
        height: 25
  - type: vertical-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Netflix
            name: Netflix
            icon: mdi:netflix
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 40px
                - margin: 0px
                - color: red
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Tv
            name: TV
            icon: mdi:television-box
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 55px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#31759b'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: AndroidMenu
            name: Google Store
            icon: mdi:google-play
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 50px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin-bottom: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: red
      - type: entities
        entities:
          - type: divider
  - type: vertical-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: VolumeUp
            name: Volume Up
            icon: mdi:volume-plus
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: ChannelUp
            name: Channel Up
            icon: mdi:plus
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Mute
            name: Volume
            icon: mdi:volume-off
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 37px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 30px
                - margin: 0px
                - color: '#46545c'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: Jump
            name: Channel
            icon: mdi:sync
            show_name: true
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - align-self: start
                - position: absolute
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 37px 0px 0px 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 30px
                - margin: 0px
                - color: '#46545c'
      - type: horizontal-stack
        cards:
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: VolumeDown
            name: Volume Down
            icon: mdi:volume-minus
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
          - type: custom:button-card
            tap_action:
              action: call-service
              service: remote.send_command
              service_data:
                entity_id: remote.sony_bravia_tv
                command: ChannelDown
            name: Channel Down
            icon: mdi:minus
            show_name: false
            show_icon: true
            styles:
              card:
                - height: 65px
                - margin: 0px
              name:
                - font-size: 12px
                - font-family: Sans-serif
                - margin: 0px
              img_cell:
                - align-self: start
                - position: relative
                - margin: 0px
              icon:
                - width: 50px
                - margin: 0px
                - color: '#7290aa'
  - type: custom:gap-card
    height: 1


The code is ‘gaos’ its much, maybe someone has a better idea to reduce the code…

2 Likes

nice remote I like it, I might implement some of it!

I’m curious about the microphone what exactly does it do? does it wake up a near by echo or google nest ?

Thanks

@Ricks88, you may use YAML anchors to reduce the code - eg. define block with &ref_0 and reuse with *ref_0.
Would you mind sharing the last portion of your pilot? The code you shared is missing the forward/play section.

eg.

...
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num1
        name: '1'
        show_name: true
        styles: &ref_0
          card:
            - height: 45px
            - margin: 0px
          name:
            - font-size: 18px
            - font-weight: bold
            - font-family: Sans-serif
      - type: custom:button-card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.sony_bravia_tv
            command: Num2
        name: '2'
        show_name: true
        styles: *ref_0
...
1 Like

@bbiegun
Thanks for the advise, i never knew about that. How or where can i define those blocks? and can i use them on other pages to?

My code was to long to place the last part, i will split the code in 2 posts.

Code is a bit changed in the time between.

@bbiegun

Part 1

type: custom:button-card
entity: remote.sony_bravia_tv
aspect_ratio: 0
tap_action:
  action: fire-dom-event
  browser_mod:
    command: popup
    title: TV Afstandsbediening
    style:
      hui-vertical-stack-card:
        $hui-entities-card$: |
          #states {
            padding-top: 0.5em;
            padding-bottom: 1.2em;
          }
    card:
      type: custom:vertical-stack-in-card
      cards:
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              styles:
                card:
                  - height: 50px
                  - margin: 0px
            - type: custom:button-card
              styles:
                card:
                  - height: 50px
                  - margin: 0px
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: TvPower
              entity: remote.sony_bravia_tv
              name: Power
              icon: mdi:power
              show_name: false
              show_state: true
              show_entity_picture: false
              show_icon: true
              styles:
                card:
                  - height: 50px
                  - margin: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 1px 0px 0px 0px
                state:
                  - align-self: start
                  - position: absolute
                  - font-size: 12px
                  - font-family: Sans-serif
                  - font-color: rgba(255, 0, 0, 0.8)
                  - text-transform: capitalize
                  - margin: 33px 0px 0px 0px
                icon:
                  - color: orange
                  - width: 50px
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num1
              name: '1'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num2
              name: '2'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num3
              name: '3'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num4
              name: '4'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num5
              name: '5'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num6
              name: '6'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num7
              name: '7'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num8
              name: '8'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num9
              name: '9'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Display
              name: Info
              icon: mdi:information-outline
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 28px
                  - margin: 0px
                  - color: '#31759b'
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Num0
              name: '0'
              show_name: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 18px
                  - font-weight: bold
                  - font-family: Sans-serif
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Teletext
              name: Teletext
              icon: mdi:text-box-outline
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 45px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 29px
                  - margin: 0px
                  - color: green
        - type: custom:gap-card
          height: 15
        - type: horizontal-stack
          cards:
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Red
              name: Red
              icon: mdi:card
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 30px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 30px
                  - margin: 0px
                  - color: red
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Green
              name: Green
              icon: mdi:card
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 30px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 30px
                  - margin: 0px
                  - color: green
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Yellow
              name: Yellow
              icon: mdi:card
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 30px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 30px
                  - margin: 0px
                  - color: yellow
            - type: custom:button-card
              tap_action:
                action: call-service
                service: remote.send_command
                service_data:
                  entity_id: remote.sony_bravia_tv
                  command: Blue
              name: Blue
              icon: mdi:card
              show_name: false
              show_icon: true
              styles:
                card:
                  - height: 30px
                  - margin: 0px
                name:
                  - font-size: 12px
                  - font-family: Sans-serif
                  - margin-bottom: 0px
                img_cell:
                  - align-self: start
                  - position: relative
                  - margin: 0px
                icon:
                  - width: 30px
                  - margin: 0px
                  - color: blue
        - type: entities
          entities:
            - type: divider
        - type: custom:stack-in-card
          mode: vertical
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: EPG
                  name: Guide
                  icon: mdi:television-guide
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 25px 0px 0px 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: '-8px 0px 0px 0px'
                    icon:
                      - width: 30px
                      - margin: 0px
                      - color: '#31759b'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: none
                  name: Voice Command
                  icon: mdi:microphone-outline
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: '-3px 0px 0px 0px'
                    state:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - font-color: rgba(255, 0, 0, 0.8)
                      - text-transform: capitalize
                      - margin: 0px
                    icon:
                      - width: 38px
                      - color: '#46545c'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: OneTouchView
                  name: Rec List
                  icon: mdi:record
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 25px 0px 0px 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: '-8px 0px 0px 0px'
                    icon:
                      - width: 32px
                      - margin: 0px
                      - color: '#31759b'
            - type: custom:gap-card
              height: 25
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Input
                  name: Input
                  icon: mdi:application-import
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 5px 0px 0px 25px
                    icon:
                      - width: 25px
                      - margin: 0px
                      - color: '#46545c'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Up
                  name: Up
                  icon: mdi:arrow-up
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    state:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - font-color: rgba(255, 0, 0, 0.8)
                      - text-transform: capitalize
                      - margin: 0px
                    icon:
                      - width: 60px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Options
                  name: Menu
                  icon: mdi:cog-outline
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 5px 25px 0px 0px
                    icon:
                      - width: 25px
                      - margin: 0px
                      - color: '#46545c'
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Left
                  name: Left
                  icon: mdi:arrow-left
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 0px 0px 100px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Confirm
                  name: OK
                  icon: mdi:crosshairs
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 12px
                      - font-family: Sans-serif
                      - font-weight: bold
                      - margin: 20px 0px 0px 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    state:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - font-color: rgba(255, 0, 0, 0.8)
                      - text-transform: capitalize
                      - margin: 0px
                    icon:
                      - width: 40px
                      - color: '#31759b'
                      - margin: 0px
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Right
                  name: Right
                  icon: mdi:arrow-right
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 100px 0px 0px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#7290aa'
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Return
                  name: BACK
                  icon: mdi:undo-variant
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 60px
                      - margin: 0
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 11px
                      - font-family: Sans-serif
                      - font-weight: bold
                      - margin: 42px 0px 0px 25px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 5px 0px 0px 25px
                    icon:
                      - width: 35px
                      - margin: 0px
                      - color: '#46545c'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Down
                  name: Down
                  icon: mdi:arrow-down
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    state:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - font-color: rgba(255, 0, 0, 0.8)
                      - text-transform: capitalize
                      - margin: 0px
                    icon:
                      - width: 55px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Home
                  name: HOME
                  icon: mdi:home
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 60px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 11px
                      - font-family: Sans-serif
                      - font-weight: bold
                      - margin: 42px 25px 0px 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 5px 25px 0px 0px
                    icon:
                      - width: 35px
                      - margin: 0px
                      - color: '#46545c'
            - type: custom:gap-card
              height: 25
        - type: custom:stack-in-card
          mode: vertical
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Netflix
                  name: Netflix
                  icon: mdi:netflix
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 10px 0px 0px 0px
                    icon:
                      - width: 40px
                      - margin: 0px
                      - color: '#a51521'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Tv
                  name: TV
                  icon: mdi:television-box
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 55px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 8px 0px 0px 0px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#31759b'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: AndroidMenu
                  name: Google Store
                  icon: mdi:google-play
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 50px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin-bottom: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 10px 0px 0px 0px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#a51521'
            - type: entities
              entities:
                - type: divider
1 Like

@bbiegun

Part 2:

        - type: custom:stack-in-card
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: VolumeUp
                  name: Volume Up
                  icon: mdi:volume-plus
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 0px 0px 32px
                    icon:
                      - width: 45px
                      - margin: 0px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: ChannelUp
                  name: Channel Up
                  icon: mdi:plus
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 32px 0px 0px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#7290aa'
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Mute
                  name: Vol
                  icon: mdi:volume-off
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 35px 0px 0px 31px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 0px 0px 32px
                    icon:
                      - width: 30px
                      - margin: 0px
                      - color: '#46545c'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Jump
                  name: Ch
                  icon: mdi:sync
                  show_name: true
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - align-self: start
                      - position: absolute
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 36px 31px 0px 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 32px 0px 0px
                    icon:
                      - width: 30px
                      - margin: 0px
                      - color: '#46545c'
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: VolumeDown
                  name: Volume Down
                  icon: mdi:volume-minus
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 0px 0px 32px
                    icon:
                      - width: 45px
                      - margin: 0px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: ChannelDown
                  name: Channel Down
                  icon: mdi:minus
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 65px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px 32px 0px 0px
                    icon:
                      - width: 50px
                      - margin: 0px
                      - color: '#7290aa'
        - type: custom:gap-card
          height: 1
        - type: entities
          entities:
            - type: divider
        - type: custom:stack-in-card
          mode: vertical
          cards:
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Rewind
                  name: Rewind
                  icon: mdi:rewind
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 40px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 40px
                      - margin: 0px
                      - color: '#7290aa'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Play
                  name: Play
                  icon: mdi:play
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 40px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 40px
                      - margin: 0px
                      - color: '#516377'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Forward
                  name: Forward
                  icon: mdi:fast-forward
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 40px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 40px
                      - margin: 0px
                      - color: '#7290aa'
            - type: horizontal-stack
              cards:
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: OneTouchTimeRec
                  name: Record
                  icon: mdi:record-rec
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 45px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 30px
                      - margin: 0px
                      - color: red
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Pause
                  name: Pause
                  icon: mdi:pause
                  show_name: false
                  show_icon: true
                  styles:
                    card:
                      - height: 40px
                      - margin-top: 5px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 40px
                      - margin: 0px
                      - color: '#516377'
                - type: custom:button-card
                  tap_action:
                    action: call-service
                    service: remote.send_command
                    service_data:
                      entity_id: remote.sony_bravia_tv
                      command: Exit
                  name: Exit
                  icon: mdi:close-octagon
                  show_name: false
                  show_state: false
                  show_entity_picture: false
                  show_icon: true
                  styles:
                    card:
                      - height: 45px
                      - margin: 0px
                    name:
                      - font-size: 12px
                      - font-family: Sans-serif
                      - margin: 0px
                    img_cell:
                      - align-self: start
                      - position: relative
                      - margin: 0px
                    icon:
                      - width: 25px
                      - margin: 0px
                      - color: '#7290aa'
            - type: entities
              entities:
                - type: divider



Also fits in a phone screen via popup now

In that configuration where do I define the different remote configurations?

I don’t see either where are you using the custom:state-switch

Could you please send the full code of the lovelace card?

Have a look at my Github repo. For my button templates, look at my main Lovelace config.

@Ricks88 you may use anchors in the same yaml code for sure. For reusing it it may got a bit tricky as I don’t fully understand the lovelace YAML code range.
Some time ago I found nice custom card for reusing lovelace cards: GitHub - custom-cards/decluttering-card: 🧹 Declutter your lovelace configuration with the help of this card . Not use it yet, maybe you can utilise it somehow.

Just remeber, that UI editors are not anchors aware (as per my knowledge and expirience). They might just replace anchors with regular code if you’d approach them from not from the desired angle. I haven’t fully tested it in lovelace yet.

Thank you a lot for the remote code! :slight_smile:

1 Like