How do I actually make a TV Remote Control work well in the GUI

So, I bought two broadlink rm mini 3 devices, and they work exactly like I want them to work. That is, I can control TV’s and other things with them just fine.

What I have been completely unable to do is build a working TV Remote card in the GUI that isn’t just a list of switches. I have read through, and tried multiple configurations in this forum, but I am clearly missing something.

This one works perfectly, but is ugly, and hardly possible to use:

entities:
  - entity: switch.power
  - entity: switch.volume_up
  - entity: switch.volume_down
  - entity: switch.up
  - entity: switch.down
  - entity: switch.left
  - entity: switch.right
  - entity: switch.enter
  - entity: switch.home
show_header_toggle: false
title: Upstairs TV
type: entities

This one looks great (based off of the comments and directions on this forum) but does not function at all:

Screen Shot 2020-07-17 at 1.26.36 PM

entities:
  - entity: switch.power
    icon: 'mdi:power'
    name: ' '
  - entity: switch.power
    icon: 'mdi:web'
    name: ' '
  - entity: switch.power
    icon: 'mdi:netflix'
    name: ' '
  - entity: switch.power
    icon: 'mdi:television-box'
    name: ' '
  - entity: switch.power
    icon: 'mdi:playstation'
    name: ' '
  - entity: switch.mute
    icon: 'mdi:volume-off'
    name: ' '
  - entity: switch.home
    icon: 'mdi:home'
    name: ' '
  - entity: switch.up
    icon: 'mdi:chevron-up-box-outline'
    name: ' '
  - entity: switch.play
    icon: 'mdi:play-pause'
    name: ' '
  - entity: switch.stop
    icon: 'mdi:stop'
    name: ' '
  - entity: switch.volume_up
    icon: 'mdi:volume-plus'
    name: ' '
  - entity: switch.left
    icon: 'mdi:chevron-left-box-outline'
    name: ' '
  - entity: switch.enter
    icon: 'mdi:checkbox-blank-circle-outline'
    name: ' '
  - entity: switch.right
    icon: 'mdi:chevron-right-box-outline'
    name: ' '
  - entity: switch.rewind
    icon: 'mdi:rewind'
    name: ' '
  - entity: switch.volume_down
    icon: 'mdi:volume-minus'
    name: ' '
  - entity: switch.return
    icon: 'mdi:undo'
    name: ' '
  - entity: switch.down
    icon: 'mdi:chevron-down-box-outline'
    name: ' '
  - entity: switch.source
    icon: 'mdi:closed-caption'
    name: ' '
  - entity: switch.fast_forward
    icon: 'mdi:fast-forward'
    name: ' '
show_icon: true
show_name: false
show_state: false
title: Samsung TV Upstairs
type: glance

I have been trying various iterations on the code above, but I am clearly missing some steps in how to properly configure a TV remote card in the GUI. Some pointers on my mistakes, and how I should be doing this correctly would be truly appreciated!

4 Likes

Something like this?

16 Likes

Yes! Exactly like that!

I cannot figure out how to make the buttons actually function. When I build cards like that, the buttons don’t work. When I build a list of switches, they work, but it is obviously terrible.

Ok, first you need to install the custom button card: Lovelace: Button card

You will also need the custom:hui-element card, 🔹 hui-element - Use built-in elements in the wrong place this allows us to use things like horizontal stacks in entities cards.

Then at the top of the raw edit mode paste these button templates:

button_card_templates:
  icon_button:
    aspect_ratio: 4/3
    color_type: icon
    hold_action:
      action: none
    layout: vertical
    show_label: false
    show_name: false
    show_state: false
    styles:
      card:
        - border-radius: 10px
        - border: solid 1px var(--primary-color)
        - box-shadow: none
        - padding: 6px 6px
        - margin: 0px 0px
        - '--paper-card-background-color': 'rgba(0, 0, 0, 0)'
      icon:
        - width: 28px
      name:
        - justify-self: middle
        - align-self: end
        - font-size: 14px
        - padding: 0px 0px
        - color: var(--secondary-text-color)
    tap_action:
      action: call-service
  menu_button:
    aspect_ratio: 4/3
    color_type: icon
    hold_action:
      action: none
    layout: vertical
    show_label: false
    show_name: true
    show_state: false
    styles:
      card:
        - border-radius: 10px
        - border: solid 1px var(--primary-color)
        - box-shadow: none
        - padding: 6px 6px
        - margin: 0px 0px
        - '--paper-card-background-color': 'rgba(0, 0, 0, 0)'
      icon:
        - width: 28px
      name:
        - justify-self: middle
        - align-self: end
        - font-size: 14px
        - padding: 0px 0px
        - color: var(--secondary-text-color)
    tap_action:
      action: call-service

We can then use the templates to build our remotes. These are just a bunch of buttons in horizontal stacks in an entities card. The advantage of the entities card (rather than a vertical stack) is that it can have a title and has a border. e.g. my TV remote card:

entities:
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_on
        name: 'On'
        tap_action:
          service: script.lounge_tv_on
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_off
        name: 'Off'
        tap_action:
          service: script.lounge_tv_off
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_input_tv
        name: TV
        tap_action:
          service: script.lounge_tv_input_tv
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_input_kodi
        icon: 'mdi:kodi'
        name: Movie
        tap_action:
          service: script.lounge_tv_input_kodi
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_play
        name: Play
        tap_action:
          service: script.lounge_tv_play
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_pause
        name: Pause
        tap_action:
          service: script.lounge_tv_pause
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_stop
        name: Stop
        tap_action:
          service: script.lounge_tv_stop
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_rec
        name: Record
        styles:
          icon:
            - color: red
        tap_action:
          service: script.lounge_tv_rec
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_menu
        name: Menu
        tap_action:
          service: script.lounge_tv_menu
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_rewind
        name: Rewind
        tap_action:
          service: script.lounge_tv_rewind
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_ffwd
        name: F-Forwad
        tap_action:
          service: script.lounge_tv_ffwd
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_ch_up
        name: Ch Up
        tap_action:
          service: script.lounge_tv_ch_up
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_option
        name: Options
        tap_action:
          service: script.lounge_tv_option
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_skip_back
        name: Skip Back
        tap_action:
          service: script.lounge_tv_skip_back
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_skip_fwd
        name: Skip Fwd
        tap_action:
          service: script.lounge_tv_skip_fwd
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_last_ch
        name: Last Ch
        tap_action:
          service: script.lounge_tv_last_ch
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_guide
        name: Guide
        tap_action:
          service: script.lounge_tv_guide
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_info
        icon: 'mdi:information-outline'
        name: Info
        tap_action:
          service: script.lounge_tv_info
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_up
        icon: 'mdi:arrow-up-bold'
        name: Up
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_tv_up
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_ch_dn
        name: Ch Dn
        tap_action:
          service: script.lounge_tv_ch_dn
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_media
        icon: 'mdi:folder-multiple-image'
        name: Media
        tap_action:
          service: script.lounge_tv_media
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_left
        icon: 'mdi:arrow-left-bold'
        name: Left
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_tv_left
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_ok
        name: Ok
        tap_action:
          service: script.lounge_tv_ok
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_right
        icon: 'mdi:arrow-right-bold'
        name: Right
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_tv_right
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_www
        name: Internet
        tap_action:
          service: script.lounge_tv_www
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_return
        name: Return
        tap_action:
          service: script.lounge_tv_return
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_down
        icon: 'mdi:arrow-down-bold'
        name: Down
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_tv_down
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_exit
        name: Exit
        tap_action:
          service: script.lounge_tv_exit
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_tv_red
        name: Red
        styles:
          icon:
            - color: red
        tap_action:
          service: script.lounge_tv_red
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_green
        name: Green
        styles:
          icon:
            - color: '#00ff00'
        tap_action:
          service: script.lounge_tv_green
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_yellow
        name: Yellow
        styles:
          icon:
            - color: yellow
        tap_action:
          service: script.lounge_tv_yellow
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_tv_blue
        name: Blue
        styles:
          icon:
            - color: blue
        tap_action:
          service: script.lounge_tv_blue
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
show_header_toggle: false
title: TV Remote
type: entities

In my case the scripts the buttons call send IR commands to an iTach but the process is similar for the RM (or any other method that can be scripted). Here are a few example scripts:

lounge_tv_down:
  sequence:
    service: remote.send_command
    data:
      entity_id: remote.lounge_tv
      command: "Down"

lounge_tv_exit:
  sequence:
    service: remote.send_command
    data:
      entity_id: remote.lounge_tv
      command: "Exit"

lounge_tv_ffwd:
  sequence:
    service: remote.send_command
    data:
      entity_id: remote.lounge_tv
      command: "FFwd"

Note that there is no icon specified anywhere. This is because the previous method I used had the icons assigned to scripts in customize:

script.lounge_tv_down:
  icon: mdi:arrow-down-bold-circle
  friendly_name: Down
script.lounge_tv_exit:
  icon: mdi:backspace
  friendly_name: Exit
script.lounge_tv_ffwd:
  icon: mdi:fast-forward

You don’t have to do it this way. Yo can specify an icon in the button card. e.g. here’s the card for the Kodi remote that does not use customize for the icons:

entities:
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_input_home
        icon: 'mdi:home'
        name: Home
        tap_action:
          service: script.lounge_kodi_input_home
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_contectx_menu
        icon: 'mdi:menu'
        name: Menu
        tap_action:
          service: script.lounge_kodi_input_contectx_menu
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_up
        icon: 'mdi:arrow-up-bold'
        name: Up
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_kodi_input_up
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_info
        icon: 'mdi:information-outline'
        name: Info
        tap_action:
          service: script.lounge_kodi_input_info
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_play_pause
        icon: 'mdi:play-pause'
        name: Play/Pause
        tap_action:
          service: script.lounge_kodi_player_play_pause
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_left
        icon: 'mdi:arrow-left-bold'
        name: Left
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_kodi_input_left
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_select
        icon: 'mdi:check-circle-outline'
        name: Ok
        tap_action:
          service: script.lounge_kodi_input_select
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_right
        icon: 'mdi:arrow-right-bold'
        name: Right
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_kodi_input_right
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_stop
        icon: 'mdi:stop'
        name: Stop
        tap_action:
          service: script.lounge_kodi_player_stop
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_back
        icon: 'mdi:backburger'
        name: Return
        tap_action:
          service: script.lounge_kodi_input_back
        template: menu_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_down
        icon: 'mdi:arrow-down-bold'
        name: Down
        styles:
          card:
            - background: var(--secondary-background-color-alpha)
        tap_action:
          service: script.lounge_kodi_input_down
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_input_next_subtitle
        icon: 'mdi:subtitles-outline'
        name: Subtitle
        tap_action:
          service: script.lounge_kodi_input_next_subtitle
        template: menu_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_rewind
        icon: 'mdi:rewind'
        name: Rewind
        tap_action:
          service: script.lounge_kodi_player_rewind
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_fast_fwd
        icon: 'mdi:fast-forward'
        name: Forward
        tap_action:
          service: script.lounge_kodi_player_fast_fwd
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_back
        icon: 'mdi:skip-previous'
        name: Skip Back
        tap_action:
          service: script.lounge_kodi_player_skip_back
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd
        icon: 'mdi:skip-next'
        name: Skip Fwd
        tap_action:
          service: script.lounge_kodi_player_skip_fwd
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - card_type: horizontal-stack
    cards:
      - entity: script.lounge_kodi_player_skip_back_30
        icon: 'mdi:rewind-30'
        name: Back 30s
        tap_action:
          service: script.lounge_kodi_player_skip_back_30
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_back_10
        icon: 'mdi:rewind-10'
        name: Back 10s
        tap_action:
          service: script.lounge_kodi_player_skip_back_10
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd_10
        icon: 'mdi:fast-forward-10'
        name: Fwd 10s
        tap_action:
          service: script.lounge_kodi_player_skip_fwd_10
        template: icon_button
        type: 'custom:button-card'
      - entity: script.lounge_kodi_player_skip_fwd_30
        icon: 'mdi:fast-forward-30'
        name: Fwd 30s
        tap_action:
          service: script.lounge_kodi_player_skip_fwd_30
        template: icon_button
        type: 'custom:button-card'
    type: 'custom:hui-element'
  - artwork: full-cover
    entity: media_player.lounge_osmc_kodi
    group: true
    hide:
      artwork: false
      controls: true
      icon: true
      name: true
      power: true
      power_state: true
      source: true
      volume: true
    icon: 'mdi:kodi'
    info: scroll
    type: 'custom:mini-media-player'
show_header_toggle: false
title: Kodi Remote
type: entities

Also:

Rimmer: “Mr. Flibble’s very cross. What are we going to do with them Mr. Flibble?”
(…)
Rimmer: “We can’t possibly do that! Who’d clear up the mess?”

:rofl:

18 Likes

Rimmer: “What happens to naughty boys who’ve been naughty, Mr. Flibble?”

Mr. Fibble: “Uncle Arnie fries them alive with his hex vision.”

Yes! This is exactly the sort of thing I am looking for!

Thanks! I will get to work on porting over my configs to something with a high WAF!

2 Likes

Do you have the “new” RM Mini 3? I have an older one and now bought a new one which looks identical, but seems like it isn’t…the docs at https://www.home-assistant.io/integrations/broadlink/ are extremely confusing about what needs to be done, specifically this part:

To fix the problem, you need to follow these steps:

* Remove the device from Broadlink App
* Factory reset the device
* Add the device to your local network using the app
* Do not set up a cloud (not now, not ever). This means that you don’t have to complete the setup in the app, configure only the Wi-Fi and don’t add the Broadlink device to the app
* Specify the correct device type in the configuration file

The step about not setting up a cloud, how exactly can I do that while still setting it up in the Broadlink app for the WiFi? Do they mean I should use AP Setup instead of Smart Setup?

Anyway, long-story short, what I was looking for is your configuration.yaml entry for the RM Mini 3, if you’d be so kind as to share it :slight_smile:

I am still templating out the excellent code from @tom_l - but I can verify that his templates work with the RM Mini.

Before you get started with the RM Mini 3 - I highly recommend this video, which is what I used to get up and going:

That video above probably contains everything you need to get up and running.

I have created a few scripts such as samsung_upstairs.yaml which have entries like the one below. Each entry is a different IR signal that I had to program the RM Mini with by pointing the remote at the RM Mini, then copying the code. I strongly recommend using the windows based Broadlink Manager that Dr Zzz talks about in his videos, as doing it manually (which I have tried) is horrible, and the Broadlink Manager software makes it go a lot faster.

      power:
         friendly_name: "Power"
         command_on: 'JgACA5aUEzcTNxM3ExIWDxMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhMSExITEhMSEzcTEhM3EzcTNBY3EzcTNxMABgqWlBQ2FDYUNhQRFBEUERQRFBEUNhQ2FDYUERQSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAAYKlpQTNxM3EzcTERQSExITEhMSEzcTNxM3ExITEhMSExITEhMSEzcTEhMSEw8WEhMSExITNxMSEzcTNxM3EzcTNxM3EwAGCpaTFDYUNhQ2FBEUERQRFBEUERQ2FDYUNhQRFBEUERQRFBEUERQ2FBEUERQSExITEhMSEzYUERQ2FDYUNhQ2FDYUNhQABgiXlBM3EzcTNxMSExITEhMSExITNxM3EzcTEhMSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAAYKlpQTNhQ3EzcTEhMSExITEhMSEzcTNxM3ExITEhcOExITEhMPFjcTEhMSExITEhMSExITNxMSEzcTNxM3FzMTNxM3EwAGCpaUEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhMSExITDhcSEzcTEhM3EzcTNxM2FDYUNhQABgmWlBQ2FDYUNhQRFBEUERQRFBEUNhQ2FDYTEhMSFBETEhMSExITNxMSFBETEhQRExITEhM3ExITNxQ2EzcTNxM3EzcTAAYKlpQTNxM3EzcTEhMSExITEhMSEzcTNxM3ExAVEhMSExITEhMSEzcTEhMSExITEhMSExITNxMSEzcTNxM3EzcTNxM3EwAGCpaTFDYUNhQ2FBETEhQRFBEUERQ2FDYUNhQRExITEhQRFBETEhM1FRITEhMSExITEhMSEzcTEhM3EzcTNxM3GDITNRUABgqWlBM3EzcTNxMSExITEhMSExITNxM3EzcTEhMSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAA0FAAAAAAAA'
         command_off: 'JgACA5aUEzcTNxM3ExIWDxMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhMSExITEhMSEzcTEhM3EzcTNBY3EzcTNxMABgqWlBQ2FDYUNhQRFBEUERQRFBEUNhQ2FDYUERQSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAAYKlpQTNxM3EzcTERQSExITEhMSEzcTNxM3ExITEhMSExITEhMSEzcTEhMSEw8WEhMSExITNxMSEzcTNxM3EzcTNxM3EwAGCpaTFDYUNhQ2FBEUERQRFBEUERQ2FDYUNhQRFBEUERQRFBEUERQ2FBEUERQSExITEhMSEzYUERQ2FDYUNhQ2FDYUNhQABgiXlBM3EzcTNxMSExITEhMSExITNxM3EzcTEhMSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAAYKlpQTNhQ3EzcTEhMSExITEhMSEzcTNxM3ExITEhcOExITEhMPFjcTEhMSExITEhMSExITNxMSEzcTNxM3FzMTNxM3EwAGCpaUEzcTNxM3ExITEhMSExITEhM3EzcTNxMSExITEhMSExITEhM3ExITEhMSExITDhcSEzcTEhM3EzcTNxM2FDYUNhQABgmWlBQ2FDYUNhQRFBEUERQRFBEUNhQ2FDYTEhMSFBETEhMSExITNxMSFBETEhQRExITEhM3ExITNxQ2EzcTNxM3EzcTAAYKlpQTNxM3EzcTEhMSExITEhMSEzcTNxM3ExAVEhMSExITEhMSEzcTEhMSExITEhMSExITNxMSEzcTNxM3EzcTNxM3EwAGCpaTFDYUNhQ2FBETEhQRFBEUERQ2FDYUNhQRExITEhQRFBETEhM1FRITEhMSExITEhMSEzcTEhM3EzcTNxM3GDITNRUABgqWlBM3EzcTNxMSExITEhMSExITNxM3EzcTEhMSExITEhMSExITNxMSExITEhMSExITEhM3ExITNxM3EzcTNxM3EzcTAA0FAAAAAAAA'

You need to go through each of your remotes that you want to use and create the corresponding entries in the yaml file for that given broadlink. (Dr Zzzz method with the windows program is much better than doing this manually).

In my configuration.yaml I have the following to ensure that the broadlink will connect to HA:
(Notice the switches line in there!!!)

  - platform: broadlink
    host: 10.0.1.1
    mac: 'A0:B1:C2:D3:E4:F5'
    switches: !include samsung_upstairs.yaml

Then, in scripts.yaml I have entries like:

samsung_upstairs_tv_on:
  sequence:
    service: switch.toggle
    data:
      entity_id: switch.power

Then finally, I have the following in the card in the GUI for users to use:

entities:
  - card_type: horizontal-stack
    cards:
      - entity: script.samsung_upstairs_tv_on
        name: 'On'
        tap_action:
          service: script.samsung_upstairs_tv_on
        template: menu_button
        type: 'custom:button-card'
      - entity: script.samsung_upstairs_tv_off
        name: 'Off'
        tap_action:
          service: script.samsung_upstairs_tv_off
        template: menu_button
        type: 'custom:button-card'

So, the process is this:

Get the RM Mini 3 setup - this part is annoying (make sure it has a static IP)

Once it is, add it to your configuration.yaml so Home Assistant can talk to it.

Create a list of all the “switches” you want to use in something like samsung_upstairs.yaml

Add each switch to your scripts.yaml

\Finally, you can add the button entities to your GUI as described above.

3 Likes

I need to organize my it codes before it gets out of hand.

Thank you for the detailed info! I got it working, for me it boiled down to 2 things which I felt the docs were a bit unclear about:

  • After adding it to the WiFi network in the Broadlink app, it has a final step in which I should hit Cancel. This keeps it on the WiFi network, but doesn’t add it to the app, thus solving the cloud issue.

  • Even the new ones can be added as switches, not remotes, so the only real difference was the step above, after which I was able to configure it exactly like the old RM Mini 3.

One other thing, though - Broadlink Manager doesn’t work for me with the new RM Mini 3, it says that it can’t write to it and doesn’t allow me to do anything with learning/sending commands. Luckily I had the old RM Mini 3, which works fine with it and I can just copy the commands from it.

I did try one of those (broadlink) and just gave up and went for a Harmony Hub. I only use HA to link to it so I can make it part of my bedtime routine by turning everything off. I’m sure people love controlling this in HA but I just don’t see the point. I already have a Harmony Elite and it’s just as easy to pick that up and control my Home Theatre system…

1 Like

For my home theater I also have a Harmony Hub, but for my weird-brand aircon it simply would not learn my remote properly, whereas the Broadlink works perfectly. It’s also much cheaper if you need several around the house, like for multiple aircon units.

Yeah gotcha… Was more thinking of the original question in first post… Totally understand other use cases like yours.

Hello @tom_l

thank you so much for sharing this code with us. You are the guy.

1 Like

@tom_l, Here the remote control after some modifications that were necessary for my environment. Thank you again.

1 Like

Thank you all for your help with this I would like to share what I have done

Heres my Code, I’ve used a combination of Vertical Stack, Hosrisontal stack, Buton Cards and Custom:button-cards, Hope this helps all

A couple of quick pointers too

RM pro 4
initially created a bunch of switches (using remote.learn_command) and copying learned commands from .storage/broadlink_remote_xxxxxxxxxxxx_codes

here’s an extract from my configuration.yaml

switch: !include switch.yaml

# remote control
remote:
  - platform: broadlink
    host: 10.0.0.XX
    mac: A0:43:B0:XX:XX:XX
    name: RM Pro

example of switch.yaml

  - platform: broadlink
    host: 10.0.0.XX
    mac: A0:43:B0:XX:XX:XX
    switches:
#Sony Tv
     sony_power:
       friendly_name: "Sony Power"
       command_on: "JgCMAE0UJhUSFiYVEhUmFRIWEhUmFRMVEhUSFhMAA1BNFSYWERYmFRMUJhUTFRIVKBMTFRMVERYSAANRThQmFRIWJRYSFSYVEhYSFSYVEhYTFBMVEgADUk4VJhUSFScVEhUmFRIWEhUmFRIVExUSFRMAA1JOFSUWExQmFRMVJRYTFBIWJRYSFRIWEhUSAA0FAAAAAAAAAAAAAA=="
       command_off: "JgCMAE0UJhUSFiYVEhUmFRIWEhUmFRMVEhUSFhMAA1BNFSYWERYmFRMUJhUTFRIVKBMTFRMVERYSAANRThQmFRIWJRYSFSYVEhYSFSYVEhYTFBMVEgADUk4VJhUSFScVEhUmFRIWEhUmFRIVExUSFRMAA1JOFSUWExQmFRMVJRYTFBIWJRYSFRIWEhUSAA0FAAAAAAAAAAAAAA=="

Raw Config from lovelace editor

type: vertical-stack
cards:
  - type: button
    tap_action:
      action: navigate
      navigation_path: overview
    entity: null
    show_icon: false
    name: Back to Home
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        styles:
          icon:
            - color: green
          entity: switch.sony_source
        icon: 'mdi:import'
        show_name: false
        tap_action:
          action: toggle
      - type: button
        tap_action:
          action: none
        show_icon: true
        show_name: false
        icon: 'mdi:sony'
      - type: 'custom:button-card'
        styles:
          icon:
            - color: orange
        tap_action:
          action: toggle
        entity: switch.sony_power
        icon: 'mdi:power'
        show_name: false
        icon_height: 50px
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_tv
        icon: 'mdi:television'
        show_name: false
        icon_height: 50px
      - type: 'custom:button-card'
        styles:
          icon:
            - color: white
        tap_action:
          action: toggle
        entity: switch.sony_up
        icon: 'mdi:arrow-up'
        icon_height: 50px
        show_name: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_home
        show_name: false
        icon: 'mdi:home'
        icon_height: 50px
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        styles:
          icon:
            - color: white
        tap_action:
          action: toggle
        entity: switch.sony_left
        icon: 'mdi:arrow-left'
        icon_height: 50px
        show_name: false
      - type: 'custom:button-card'
        styles:
          icon:
            - color: white
        tap_action:
          action: toggle
        entity: switch.sony_select
        icon: 'mdi:arrow-all'
        icon_height: 50px
        show_name: false
        hold_action:
          action: toggle
      - type: 'custom:button-card'
        styles:
          icon:
            - color: white
        tap_action:
          action: toggle
        entity: switch.sony_right
        icon: 'mdi:arrow-right'
        icon_height: 50px
        show_name: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_back
        icon: 'mdi:undo-variant'
        icon_height: 50px
        show_name: false
      - type: 'custom:button-card'
        styles:
          icon:
            - color: white
        tap_action:
          action: toggle
        entity: switch.sony_down
        show_name: false
        icon: 'mdi:arrow-down'
        icon_height: 50px
      - type: 'custom:button-card'
        styles:
          icon:
            - color: red
        tap_action:
          action: toggle
        entity: switch.sony_netflix
        icon: 'mdi:netflix'
        show_name: false
        icon_height: 50px
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_volume_up
        show_name: false
        icon: 'mdi:volume-plus'
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_channel_up
        show_name: false
        icon: 'mdi:plus'
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_volume_down
        icon: 'mdi:volume-minus'
        show_name: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_channel_down
        icon: 'mdi:minus'
        show_name: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_1
        show_icon: false
        name: '1'
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_2
        show_icon: false
        name: '2'
        show_name: true
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_3
        show_name: true
        show_icon: false
        name: '3'
        show_state: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_4
        name: '4'
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_5
        name: '5'
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_6
        name: '6'
        show_icon: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_7
        name: '7'
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_8
        name: '8'
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_9
        name: '9'
        show_icon: false
  - type: horizontal-stack
    cards:
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_exit
        name: exit
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_0
        name: '0'
        show_icon: false
      - type: button
        tap_action:
          action: toggle
        entity: switch.sony_text
        name: teletext
        show_icon: false
  - type: horizontal-stack
    cards:
      - type: 'custom:button-card'
        styles:
          icon:
            - color: red
        tap_action:
          action: toggle
        entity: switch.sony_red
        icon: 'mdi:card'
        show_name: false
      - type: 'custom:button-card'
        styles:
          icon:
            - color: green
        tap_action:
          action: toggle
        show_name: false
        entity: switch.sony_green_2
        icon: 'mdi:card'
      - type: 'custom:button-card'
        styles:
          icon:
            - color: yellow
        tap_action:
          action: toggle
        entity: switch.sony_yellow
        icon: 'mdi:card'
        show_name: false
      - type: 'custom:button-card'
        styles:
          icon:
            - color: blue
        tap_action:
          action: toggle
        entity: script.sony_blue
        icon: 'mdi:card'
        show_name: false

Hope this helps those trying to create a remote for you TV

6 Likes

My implementation of a “universal remote” in Home Assistant, was simply to use a picture of a Harmony Classic Remote device, and assign actions to each button:

The YAML code associated with this card is too long to paste here, but you’ll find on Pastebin; Harmony Remote YAML - Pastebin.com
In addition, it require a script.yaml that takes care of adapting the key presses dependingon the chosen activity at any time (TV, Radio, Media Libray, Apple TV, etc.). This script is also on Pastebin: Media selector Script - Pastebin.com

Note: I have expanded the code somewhat since this early version, but the principle is the same throughout once you understand how it works.
I have had this for several years now, and never ever had any issues with it. It also works fairly well on a Mobile phone screen - even though the buttons are a bit too small.
Nobody in my household ever bother to look for the remote control anymore. They’ve all got their own copy :blush:

10 Likes

I shared my config here
https://community.home-assistant.io/t/share-your-lovelace-home-theater-remote-setup/119857/68

and here
https://community.home-assistant.io/t/share-your-broadlink-ir-rf-codes/295055

The last one is a topic for sharing Broadlink IR and RF codes, so feel free to add your own Broadlink codes.

1 Like

So i made remake of someone’s from there remote, ad made it kind of easier.
My tv is samsung (without android) with amazon and netflix and unused rakutten:

image

You need simply script (scripts.yaml) and learned tv keys

#script.yaml
tv_command:
  alias: tv_command
  sequence:
  - service: remote.send_command
    target:
      device_id: a18d544471ea9edf3eb9136b31d353f5
  mode: single
  icon: mdi:code-tags-check

Codes (maybe someone will use that)

{
    "version": 1,
    "minor_version": 1,
    "key": "broadlink_remote_a043b0725975_codes",
    "data": {
        "television": {
            "turn on": "JgDSAJKVEjcSOBE4EhMSExEUERQRExI4ETgSOBEUERQRFBETEhMRFBE4EjgRFBEUETgSOBE4EjgRFBQQEjgRORETEhMSExEABgOTlRI4ETgSOBEUERQRExITERQROBI4ETkRExITEhMRFBEUERMSOBE4EhMSExE5ETgSOBE4EhMRFBE4EjgRFBEUERMSAAYDk5USNxI4ETgSExITERQRFBETEjgRORE4ERQRFBEUERMSExEUETkRExITERQRFBETEhMSOBEUETgSOBQ1FDYROBI4EQANBQ==",
            "turn off": "JgDSAJKVEjcSOBE4EhMRFBEUERQRExI4ETkROBEUERQRFBETEhMSExE5ETgRFBEUETgSOBE4EjgRFBEUETgSOBEUERMSExIABgKUlBM3ETkROBITERQRFBEUERMSOBE4EjgRFBEUERMSExITERQROBI4ExIRFBM2EjgROBM3ERQTEhE4EzcTEhETExITAAYBlJUSNxI4ETgSExITERQRFBETEjgRORE4ERQRFBEUERMSExEUETgSExITERQRFBETEhMSOBEUETgSOBE4EjgRORE4EgANBQ==",
            "source": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE4FDYTNxMRFBETEhMSExITNhMSExITEhMRFBETEhMSExEUNhM3EzYTNxM2FDYTNhQABjwLHgoNChYKAA0F",
            "1": "JgBQAJKVEjcSOBE4EhMSExEUERQRExI4ETkROBEUERQRFBETEhMRFBEUETgSExEUERQRExITETkROBITETkROBI4ETgSOBEABj4KIAgPCBgIAA0F",
            "2": "JgBQAJGVFDYROBI4ERQRFBETEhMSExE5ETgSOBEUERMSExITERQROBITEjgRFBETEhMRFBEUERQROBEUETgSOBE5ETgSOBEABj4KHwwLCRgIAA0F",
            "3": "JgBQAJKUEzcRORQ1EhMRFBEUERMSExI4ETgSOBEUERQRExITFBERFBE4EjgRFBETEhMSExEUETgSExITETkTNhE5FDUSOBEABj4KIAgPCBgIAA0F",
            "4": "JgBQAJKVEjcSOBE5ERMSExITERQRFBE4ETkROBITERQRFBEUERMSExEUERQROBITERQRFBEUETgRORE4EhMRORE4EjgROBIABj4JIAsMCxUJAA0F",
            "5": "JgBQAJKUFDYTNxM2ExITEhMSExEUERM3EzYTNxMSExEUERMSExITNhQRExITNhQRFBETEhMSExIaLxQ2ExEUNhM3EzYTNxMABjwJIAsMCRcJAA0F",
            "6": "JgBQAJGVEjgROBI4ERQRExITERQRFBE4EjgROBITEhMRFBEUERMSExI4ERQROBITERQRFBETEjgRFBE4EhMRORE4EjgROREABj4LHgkOCRcJAA0F",
            "7": "JgBQAJSVEjcSOBE5ERMSExITERQRFBE4EjgROBITERQRFBEUERMSExEUETgSOBEUERQRExITEjgROBITERQRORE4ETkROBIABj4JIAkOCBgJAA0F",
            "8": "JgBQAJKUEzcRORE4ERQRFBEUERMSExE5ETgSOBEUERMSExITERQROBITEjgROBITERQRFBETEhMSOBEUERMSOBE5ETgSOBEABj4KHwkOCRcJAA0F",
            "9": "JgBQAJGVEjgROBI4ERQRExITEhMRFBE4EjgROBITEhMRFBEUERMSExI4ETgSOBEUERQRExITEjgRFBETEhMRORE4EjgROBIABj4JIAsMCBgIAA0F",
            "ttx": "JgBQAJGVFDYROBI4ERQRFBETERQRFBE4EzcRORETEhMRFBEUERMSExITETkROBITETkRExQREjgROBITEhMRORETEjgROREABj4JIAkOCRcJAA0F",
            "0": "JgBQAJGVEjgROBE5ERMSExITERQRFBE4EjgROBITFBERFBQRERMSOBEUERMSExI4ERQRExITEhMRORE4ETkRFBE4ETkROBIABj4JIAsMCBgIAA0F",
            "prech": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE4EjgRORETEhMSExEUERQROBE5ERQRFBE4ERQRExITEhMRFBE4EjgRFBE4EjgROBIABj4LHgkOCBgIAA0F",
            "vol_up": "JgBQAJKVEjcSOBE4EhMRFBEUERQRExI4ETgSOBEUERQRExITEhMRORE4EjgRFBETEhMRFBEUERQRExITETkROBI4ETgSOBEABj8KHwsMChYKAA0F",
            "vol_down": "JgBQAJKVEjgROBI4ERQRFBETEhMRFBE4EjgRORETEhMRFBEUERQROBE5ERMSOBEUERQRExITERQRFBE4EhMRORE4EjgROBIABj4LHggPCBgIAA0F",
            "mute": "JgBGAJOTEzcROBI4ERQTEhETExISExM3EjcTNxMSEhITEhMSExITNhM3EzYTNxMSExITERMSExITEhMSExETNxM2EzcTNxMADQU=",
            "chlist": "JgBQAJKVEjcSOBE5ERMSExITFBERFBE4ETkROBITERQRFBETEhMSOBE4EhMSOBEUETgSOBEUERMSExE5ERMSOBEUERQROBIABj4JIAgPCBgIAA0F",
            "ch_up": "JgBQAJOTEzcTNhM3ExITERQRFBETEhM2FDYTNhQRExITEhMSExEUERM3ExITERQ2ExITEhMRFDYTEhM2FDYTEhM2EzcTNhQABjwLHggPCBgIAA0F",
            "ch_down": "JgBQAJKVETgRORE4EhMRFBEUERMTEhE5ETgSOBEUERQRExITERQRFBETEhMSFQ85ERMSExITETkROBI4ETgSExE5ETgSOBEABj8JHwkOCRcJAA0F",
            "netflix": "JgBQAJKVEjcSOBE4EhMSExEUERQRExI4ETkROBEUERQRFBETEhMRORE4EhMRFBE4EjgRORE4EhMRFBE4EjgRFBEUERMSExEABj8IIQgPCBgIAA0F",
            "home": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE5ETgRORETEhMSExEUERQROBIXDRQROBI4ETkROBEUERQROBI4ERQRFBETEhMROREABj4LHgkOCRcJAA0F",
            "prime": "JgBQAJOTFDUUNhM3ExEUERMSExITEhM2EzcTNhYPExITEhMRFBETEhMSEzYUERM3EzYUNhM2FDYTNxMRFDYTEhMSExETEhMABjwKIAoMCRgIAA0F",
            "rakuten": "JgBQAJKTEzgRORE4ERQRFBEUERMSExI4ETgSOBEUERMSExITERQRFBETEjgROBI4ETkRExI4ETkROBEUERQRExITEjgRFBEABj4JIAsMCBgJAA0F",
            "up": "JgBQAJGVEjgROBM3ExITERMSERQTEhE4EzcTNhITEhMRFBEUERMSExEUExITEhMRFDYTNhQRFDYTNhQ2EzcTNhMSExITNhQABjwLHgkOCBgJAA0F",
            "guide": "JgBQAJKUEjgRORE4EhMRFBEUERMSExE5ETgSOBEUExISEhMSExITNhM3EzYUNhMSExITNhMSExITEhMRFBETNxM2FBETNxMABjwJIAkOCRcJAA0F",
            "left": "JgBQAJKVFDUSOBE4EhMSExEUERQRExI4FDUSOBQRERQRExITEhMRORETEjgRFBEUEzYRORETEhMSOBEUETgUNhETEhMSOBEABj8JHwkOCRcJAA0F",
            "ok": "JgBQAJGVEjgROBI4ERQRExITEhMRFBE4EjgRORETEhMSExEUERQRExITEhMRORETEjgRORETEjgROBI4ERQROBITEhMROREABj4JIAkOCRcJAA0F",
            "right": "JgBQAJKUFDYRORQ1EhMSExEUERMSExI4ETgSOBEUERQRExITERQRFBE4EhMRFBITETgSOBEUETgSExE5ETgSOBEUERMSOBEABj8JIAgPCBgIAA0F",
            "return": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE4EjgRORETEhMSExEUERQRExITEhMRORE4ERQROBITEjgROBI4ERQRFBE4ERQROREABj4JIAkOCBgIAA0F",
            "down": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE4EjgRORETFRASExEUERQROBEUERQRExITEjgROBITERQRORE4ETkROBITERQROBIABj4JIAgPCBgIAA0F",
            "exist": "JgBQAJOTFDYTNhQ2ExITEhMRFBETEhM2FDYTNxMRFBETEhMSExITNhMSEzYUNhMSEzYUERMSExITNhQRExITNxMREzcTNhQABjwKHw0KChYKAA0F",
            "settings": "JgBQAJGVEjgROBI4ERQRExITEhMRFBE4EjgRORETEhMRFBEUERQRExI4ERQROBI4ERQRExITEjgRFBE4EhMRFBE4EjgROREABj4KHwkOCRcJAA0F",
            "info": "JgBQAJGVEjgROBI4ERQRFBETEhMRFBE5ETgRORETEhMSExEUERQROBI4ETgSOBE5ERMSExEUERQRFBETEhMRFBE4EjgROREABj4LHgkOCRcJAA0F",
            "sub": "JgBQAJKVEjcSOBE5ERMSExEUERQRFBE4ETkROBITERQRFBETEhMROREUETgRFBEUETgTEhMSExITNhMSEzcTNhMSEzcTNhMABjwKIAgOCRgIAA0F",
            "stop": "JgBQAJKUEzcRORE4ERQRFBEUERMSExE5ETgSOBEUERMSExITERQRFBE4EjgRFBETEhMUNhEUETgSExEUETgSOBE4EhMSOBEABj8JIAgOCRgIAA0F",
            "rewind": "JgBQAJKVEjcSOBE4EhMSExEUERQRExI4ETkROBEUERQRFBETEhMRORETEjgRFBEUERMSOBEUERQROBITETkROBI4ERQROBIABj4JIAkOCRcJAA0F",
            "play": "JgBQAJGVEjgROBE5ERMSExITERQRFBE4EjgROBITEhMRFBEUERMSOBE5ETgRFBEUERQROBEUERQRExITEjgROBI4ERQROBIABj8JHwkPCBcJAA0F",
            "pause": "JgBQAJGVEjgROBI4ExIRFBMRExITEhM2FDYTNxMRFBETEhMSExITERQ2ExITNhMSExITNhQREzcTEhM2ExITNhQ2ExIROBIABj4JIAkOCRcJAA0F",
            "wind": "JgBQAJKUEzcRORE4EhMRFBEUERMSExI4ETgSOBEUERQRExITERQRFBETEhMSOBEUERMSOBEUETgSOBE5ERMSOBE4EhMSOBEABj8JIAgOCRgIAA0F"
        }
    }
}

and finally lovelace card:

      - entities:
          - entity: script.tv_command
            icon: mdi:power
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: turn on
                device: television
          - entity: script.tv_command
            icon: mdi:aws
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: prime
                device: television
          - entity: script.tv_command
            icon: mdi:netflix
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: netflix
                device: television
          - entity: script.tv_command
            icon: mdi:open-source-initiative
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: source
                device: television
          - entity: script.tv_command
            icon: mdi:nintendo-switch
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: netflix
                device: television
          - entity: script.tv_command
            icon: mdi:volume-off
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: mute
                device: television
          - entity: script.tv_command
            icon: mdi:home
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: home
                device: television
          - entity: script.tv_command
            icon: mdi:chevron-up-box-outline
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: up
                device: television
          - entity: script.tv_command
            icon: mdi:play-pause
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: play
                device: television
          - entity: script.tv_command
            icon: mdi:stop
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: stop
                device: television
          - entity: script.tv_command
            icon: mdi:volume-plus
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: vol_up
                device: television
          - entity: script.tv_command
            icon: mdi:chevron-left-box-outline
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: left
                device: television
          - entity: script.tv_command
            icon: mdi:checkbox-blank-circle-outline
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: ok
                device: television
          - entity: script.tv_command
            icon: mdi:chevron-right-box-outline
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: right
                device: television
          - entity: script.tv_command
            icon: mdi:rewind
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: rewind
                device: television
          - entity: script.tv_command
            icon: mdi:volume-minus
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: vol_down
                device: television
          - entity: script.tv_command
            icon: mdi:undo
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: return
                device: television
          - entity: script.tv_command
            icon: mdi:chevron-down-box-outline
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: down
                device: television
          - entity: script.tv_command
            icon: mdi:closed-caption
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: sub
                device: television
          - entity: script.tv_command
            icon: mdi:fast-forward
            name: ' '
            tap_action:
              action: call-service
              service: remote.send_command
              target:
                device_id: a18d544471ea9edf3eb9136b31d353f5
              service_data:
                command: wind
                device: television
        show_state: false
        title: Samsung TV
        type: glance
        state_color: false

Also its my remote:

4 Likes

This is very nice, congratulation. By any chance, did you share the code somewhere. I’d like to see how you were able to adapt @tom_l code

1 Like

Sorry to dig up this year old post, but I like this and have spent a bit this morning trying to replicate much of it in my setup. Question I have for you, as I’m not very good with templating.

What is the purpose in the scripts where you are changing “Get-TV” to “Get GB”? Or similarly, “Apple-TV” to “Apple TV”? My state_attr for current activity in Dev Tool appear to match the direct names. IE. “Apple TV” in state_attr. current_activity is named the same as in the harmony.conf file.

I guess what I’m really asking (or hoping for) is there a way I can just set device: in the scripts to = the current activity?

Once I get this up and going, I hope to also add in long button press for the Activities, and then will need to expand the scripts to include this as well.