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

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.

Oh, this is just because when I first set up the Harmony HUB, I chose one set of names, and years later, when I set up Home Assistant integrations, I named the same devices slightly different.
Eventually, when I later decided to integrate the two (HA & Harmony HUB), I didn’t bother to change the names again.

Hi! Had some questions about your remote card. I’ve been using your old version with the tiles card and it still works well but was looking to start trasnsitioning to the button card. How did you get the coloring different between the title at the top and the rest of the card? Is it just a background image? I set up a few buttons to test out. I noticed that it works differrently than the tiles card, The tiles card is very responsive. If I press the button quickly 3 times the command is sent all 3 times to my harmony hub. With the custom button card it needs time between presses. Is there a way to adjust this? Can you use custom icons or only the mdi icons?

Hey Tom,

When you say enter them at the top of raw edit mode, where are you referring to?

When you are editing the card, there is an option in the bottom left called “show code editor” where you can edit the raw yaml that makes the card work:

I see show code editor, but what card are you starting with? Entities card?