SmartIR and broadlink butto for send command

hi everyone, i integrated smartir and broandlink for a tv and climate taking all the codes i need, my question is this, how can i create a button for a single command? (virtual remote control)

You mean as a button on lovelace dashboard?
Did you use remote learn or did you create switches?

i just record all code and now i want to crate a button on lovelace.

example

button 1 - channel1
button 2 - chanel 2

Is your goal to make a picture entity card with the buttons placed on top of a picture of the remote or do you just want an entities card with clickable buttons?

i want to use custo button card for create it

Have a look at the tap action.

Actions - Home Assistant (home-assistant.io)

I think you can just create one helper and use that to all of your buttons.
You just need an entity for the button, and then you code the tap action as a service call remote send.

sorry but you can write an example?

I don’t know what custom card you are going to use and if it even works.
But using a normal entities card I can do this:

entities:
  - entity: proximity.home
    double_tap_action:
      action: call-service
      service: esphome.ns_kitchen_play_rtttl
      data:
        song_str: 'siren:d=25,o=10,b=150:d,e,d,e,d,e'

It doesn’t play oddly enough it says the song_str is not included. But the double tap action works.
In your case just use an entity and tap_action and see if you can fire the remote command.

EDIT; should have read the instructions better.

This works:

cards:
  - entities:
      - entity: proximity.home
        double_tap_action:
          action: call-service
          service: esphome.ns_kitchen_play_rtttl
          service_data:
            song_str: siren:d=25,o=10,b=150:d,e,d,e,d,e
     

So that is my proximity entity, how far I’m from home, when I double click it it plays a siren sound in the kitchen.
I’m fairly sure you can use this to send remote commands also

this is a port of remote control:


type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: custom:button-card
        color_type: card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.broadlinkletto_remote
            device: media_player.tv_camera_da_letto
            command: mute
        icon: mdi:volume-off
        color: rgb(75, 75, 77)
      - type: custom:button-card
        color_type: card
        tap_action:
          action: call-service
          service: remote.send_command
          service_data:
            entity_id: remote.broadlinkletto_remote
            device: media_player.tv_camera_da_letto
            command: 'on'

but not work

I don’t know what your remote commands are called or what the devices are called.

But when I use remote send my service call from developer tools looks like this:

service: remote.send_command
data:
  device: DVD
  command: pause
target:
  entity_id: remote.broadlink_4_remote

You need to first figure out what your command is supposed to be then try and add it to the card.

i know this old post, but i don’t understand send command. this my config and json and error.

the name of mediaplayer entity :tv cameretta bimbi (media_player.tv_cameretta_bimbi)
the name of broadlink: remote.broadlinkcameretta

this on developer tools

service: remote.send_command
data:
  num_repeats: 1
  delay_secs: 0.4
  hold_secs: 0
  device: media_player.tv_cameretta_bimbi
  command: "on"
target:
  entity_id: remote.broadlinkcameretta

this json file for code

{
    "manufacturer": "Hisense",
    "supportedModels": [
      "32cameretta"
    ],
    "supportedController": "Broadlink",
    "commandsEncoding": "Base64",
    "commands": {
        "off": "JgBgAAABI5AVEBUPFRAVEBUPFRAVEBUPFTQVNRU0FTQVNBU0FRAVNBU1FQ8VNBU1FQ8VEBUQFQ8VEBU0FRAVDxU0FTUVNBU0FQAFQgABKEcVAAxKAAEnRxUADEkAASdHFgANBQ==",
        "on": "JgBgAAABI5AVEBUPFRAVEBUPFRAVEBUPFTQVNRU0FTQVNBU0FRAVNBU1FQ8VNBU1FQ8VEBUQFQ8VEBU0FRAVDxU0FTUVNBU0FQAFQgABKEcVAAxKAAEnRxUADEkAASdHFgANBQ==",
        "previousChannel": "JgBQAAABIZMTERMSEhITEhMSEhITEhMSEjcSNxM2EzYTNxI3EhITNxI3EjcTEhI3EhITEhM2ExISEhMSEzYTEhM2EzYTEhM2EwAFRAABIkoSAA0F",
        "nextChannel": "JgBYAAABI5ETEhISExITEhISExITEhISEzYTNxI3EjcTNhM2ExITNhQREzYUERI3ExISEhM2FBETNhMSEjcTEhI3EzYTEhI3EwAFQgABJkkUAAxMAAEiShIADQU=",
        "volumeDown": "JgBQAAABIZIUERISFBETEhISExITEhMREzYTNxI3EjcTNhM2ExITNhM2EzcSEhMSExISEhM2ExITEhISEzYTNxI3EzYTEhI3EwAFQAABJkoSAA0F",
        "volumeUp": "JgBYAAABIpMTERMSExISEhMSEhITEhMSEjcSNxM2EzYTNxI3ExISNxISExITNhMSEhITEhM2ExITNhM2ExITNhM2EzcSEhM3EgAFQwABJkkTAAxKAAEmSRMADQU=",
        "mute": "JgBYAAABIZIUERMSEhITEhISExITEhISEzYTNxI3EjcTNhM2ExITNhMSEzYTNhM3EhITEhISExITNhMSEhMSEhM2EzcSNxI3EwAFRAABIkoSAAxHAAEmShIADQU=",
        "exit": "JgBgAAABIZIVEBMSEhITEhISExITEhISEzYTNxI3EzYTNhM2ExITNhMSExISNxI3EzYTEhI3ExISNxI3ExISEhMSEzYTEhI3EwAFSAABJ0kTAAxTAAEiShIADFQAASJJEwANBQ==",
        "sources": {
            "Input": "JgBYAAABKpIUERMSEzYUERQRFBETERQRFDYUNRQRFDYUNRQ2FDYTNhQ2FDUUERQ2FBEUERMRFBEUERQRFDUUERQ2FDYTNhQ2FAAFJQABKkgUAAxVAAEqSBQADQU==",
            "guide": "JgBYAAABIZIUERISExITEhISExITEhISEzYTNxI3EjcTNhM3EhITNhMSEzYTEhI3EzYTNhMSExISNxMSEjcSEhMSExISNxM2EwAFQgABJ0kTAAxKAAElSRMADQU=",
            "ch_list": "JgBYAAABIpIUERISExISEhMSExISEhMSEzYTNhM4ETcSNxM2ExISNxM2ExISEhMSExISNxMSEhITEhI3EzYTNhM3EhITNxI3EgAFQwABJkkTAAxKAAElSRMADQU=",
            "play_pause": "JgBYAAABIZMTERMSEhITEhMSEhITEhMSEjcSNxM2EzcSNxI3EhITNxISEzYTEhM2ExITEhI3EjcTNhMSEjcTEhI3EzYTEhISEwAFRgABJkkTAAxNAAElSRMADQU=",
            "menu": "JgBYAAABIpMTERMSEhITEhMSEhITEhMSEjcSNxM2EzYTNxI3EhITNxISExITNhMSEjcTEhISExISNxM2ExITNhMSEjcTNhM2EwAFSAABJEkTAAxOAAElSRMADQU=",
            "back": "JgBYAAABJJAVEBUQFBAUERQRExEUERMREzcSNxI3EzYTNhM3EhITNhMSExISEhM3EhITEhI3ExISNxM2EzYTEhM2FTQVEBQ1EwAFRgABJkkTAAxNAAEmSRMADQU=",
            "arrow_up": "JgBYAAABIpITEhISExISEhMSExISEhMSEzYTNhM3FDUSNxM2ExISNxMSEjcSNxMSEjcSEhMSExISNxMSEhITNhMSEzYTNxI3EgAFRgABJkoSAAxMAAEnSRMADQU=",
            "arrow_down": "JgBQAAABIpIUERISExITEhISExITEhISEzYTNxI3EjcTNhM2ExITNhM2EzcSNxMREzcSEhMSExISEhMSEhITNxISEzYTNxI3EwAFSQABI0kTAA0F",
            "arrow_left": "JgBQAAABIZMTERMSExISEhMSExISEhMSEjcTNhM2EzcSNxI3ExISNxI3ExISExI2EzcSEhMSExISEhM2EzcSEhMSEjcTNhM3EgAFRAABJkkTAA0F",
            "arrow_right": "JgBQAAABI5ETEhITEhITEhISExITEhISEzYTNxI3EjcTNhM2ExITNhMSExISEhM2EzcSEhMSEhITNxI3EzYTEhISEzcSNxI3EwAFQwABJ0kTAA0F",
            "ok": "JgBQAAABIpITERMSExISEhMSEhITEhMSEjcSNxM2EzYTNxI3EhITNxI3EhITNxISEzcSEhMSEhITEhM2ExISNxMSEjcTNhM2EwAFRAABJkkTAA0F",
            "home": "JgBQAAABIZMTERMSEhITEhMSEhITEhISEzcSNxM2EzYTNhM3EhITNxISExISEhMSExISNxMRExITNhM3EjcSNxM2ExISNxM2EwAFQgABJ0kTAA0F",
            "text": "JgBQAAABIZMTERMSEhITEhMSEhITEhISEzcSNxM2EzYTNxI3EhITNxI3EhITNxISExISEhM3EhITEhM2ExISNxM2EzYTEhM2EwAFRgABJkkTAA0F",
            "subtitle": "JgBYAAABIpIUERISExITEhISExISEhMSEzYTNxI3EjcTNhM2ExITNhM2EzcSNxM2EzYTEhMSEhITEhISExITEhISEzYTNxI3EwAFRQABJ0kTAAxNAAElSRMADQU=",
            "info": "JgBYAAABIZMTEhISExISEhMSExISEhMSEjcTNhM2EzcSNxI3ExISNxMSEhITNhM3EhITEhISExITNhM3EhITEhI3EzYTNhM3EgAFRgABJkoSAAxNAAEmSRMADQU=",
            "deezer": "JgBQAAABIZMTERMSEhITEhMSEhITEhISEzcSNxM2EzYTNhM3EhITNhMSEzYTNxISExISNxM2ExISNxMSEhITNhM3ExETEhM2EwAFRAABJkkTAA0F",
            "timvision": "JgBQAAABIZIUERISExITEhISExITEhISEzcTNhI3EzYTNhM2FBETNhMSEhITNxMRExITNhM2FBETNhQ1ExITNhM2ExITEhI3EwAFQwABKEgTAA0F",
            "chili": "JgBYAAABIZIUERISExITEhISExITEhISEzYTNxI3EjcTNhM2ExITNhQ1EzcSNxISExITEhISEzcSEhMSEhITNxI3EjcTNhMSEgAFRAABJkoSAAxLAAEmSRMADQU=",
            "netflix": "JgBQAAABIZIUERMSEhITEhISExITEhISEzcSNxI3EzYTNhM3EhITNhM3EhITNxI3EhITNxISExITEhI3EhITEhM2ExISNxM2EwAFQQABJkkTAA0F",
            "primevideo": "JgBYAAABIZIUERMSEhITEhISExITEhISEzYTNxI3EzYTNhM3EhITNhM3EjcTEhI3EjcTNhMSEjcTEhISEzcSEhMSEhMSNxISEwAFRwABJUoSAAxQAAEjShIADQU=",
            "youtube": "JgBQAAABIpITEhISExISEhMSExISEhMSEjcTNxI2EzcSNxM2ExISNxMSEjcSExI3EhITNxISEzYTNxISEzYTEhM2ExITNhMSEgAFRAABJ0kTAA0F",
            "rakuten": "JgBQAAABIZIUERMSEhITEhMSEhITEhISEzcSNxI3EzYTNhM3EhITNxI3EhITEhM2EzYTEhM2EzcSEhM2EzcSEhMSEjcTEhISEwAFRgABJkoSAA0F",
            "raiplay": "JgBQAAABIpITEhISExISEhMSExISEhMSEzYTNhM3EjcSNxM2ExITNhMSEjcTNhMSEhMSEhMSEjcTNhMSEhITNxI3EzYTNhMSEwAFRAABJkkTAA0F",
            "infinity": "JgBYAAABIpIUERISExITEhISExITERMSExISNxMSEjcSNxM2ExITNhMSEhITEhMSEhITEhMSEhITNhM3EjcTNhM2EzcSNxI3EwAFjQABJkoSAAxLAAEmSRMADQU=",
            "Channel 0": "JgBYAAABIZIUERMSEhITEhMSEhITEhISEzcSNxI3EzYTNhM3EhITNhMSExISEhMSExISEhMSEhITNxI3EjcTNhM2EzcSNxM2EwAFQgABJkoSAAxJAAEmShIADQU=",
            "Channel 1": "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
            "Channel 2": "JgBYAAABI5EVEBQQFRAUERQQFRAVEBMRFTQVNRQ1FDUVNBU0FRAVNBUQFTQVEBQQFRAVEBQQFRAVNBUQFDUVNBU0FTQVNRQ1FQAFPgABJ0gTAAxHAAEpRhYADQU=",
            "Channel 3": "JgBYAAABJJAUEBUQFQ8VEBUQFQ8VEBUPFTUVNBU0FTQVNBU1FQ8VNBY0FTQVEBUPFRAVDxUQFRAUEBUQFDUUNRQ2EzYSNxM2EwAFQAABKUcVAAxFAAEmSRMADQU=",
            "Channel 4": "JgBYAAABIpIUERISExITEhISExITEhISEzYTNxI3EjcTNhQ1ExITNhMSEhITNxISExITEhISExISNxM2ExISNxM2EzcSNxI3EwAFSQABJkkTAAxQAAEmSRMADQU=",
            "Channel 5": "JgBYAAABIpITERMSExISEhMSExISEhMSEjcTNhM2EzcSNxI3ExISNxI3ExISNxISExITEhISExITEhI3EhITNxI3EjcTNhM2EwAFSQABJkoSAAxRAAElSRMADQU=",
            "Channel 6": "JgBYAAABIZIUERMSEhITEhISExITEhISEzYTNxI3EzYTNhM3EhITNhMSEzYTNhMSExISEhMSExISNxISExITNhM2EzcSNxM2EwAFSQABJkoSAAxSAAEkSRMADQU=",
            "Channel 7": "JgBYAAABJJAVEBUPFRAVEBQQFRAVDxUQFTQVNBU1FDUVNBU0FRAVNBU0FTQVNRQQFRAVEBQQFRAVDxUQFRAUNRU0FTQVNBU1FQAFQwABKUYWAAxJAAEpRxUADQU=",
            "Channel 8": "JgBYAAABJJAVEBQQFRAUEBUQFRAUEBUQFTQVNBU1FDUUNRM2ExISNxMSEhITEhI3ExISEhMSExISNxI3EzcSEhI3EzYTNhM3EgAFRgABJkkTAAxMAAEmShIADQU=",
            "Channel 9": "JgBYAAABIZIUERISExISEhMSExISEhMSEzYTNhM3EjcSNxM2ExISNxM2ExISEhM3EhITEhMSEhITEhI3EzYTEhM2EzYTNxI3EgAFRgABJkoSAAxMAAEmSRMADQU=",
            "Channel 10": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABIZIUERMSEhITEhMSEhITEhISEzcSNxI3EzYTNhM3EhITNhMSExISEhMSExISEhMSEhITNxI3EjcTNhM2EzcSNxM2EwAFQgABJkoSAAxJAAEmShIADQU="
            ],
            "Channel 11": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU="
            ],
            "Channel 12": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABI5EVEBQQFRAUERQQFRAVEBMRFTQVNRQ1FDUVNBU0FRAVNBUQFTQVEBQQFRAVEBQQFRAVNBUQFDUVNBU0FTQVNRQ1FQAFPgABJ0gTAAxHAAEpRhYADQU="
            ],
            "Channel 13": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABJJAUEBUQFQ8VEBUQFQ8VEBUPFTUVNBU0FTQVNBU1FQ8VNBY0FTQVEBUPFRAVDxUQFRAUEBUQFDUUNRQ2EzYSNxM2EwAFQAABKUcVAAxFAAEmSRMADQU="
            ],
            "Channel 14": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABIpIUERISExITEhISExITEhISEzYTNxI3EjcTNhQ1ExITNhMSEhITNxISExITEhISExISNxM2ExISNxM2EzcSNxI3EwAFSQABJkkTAAxQAAEmSRMADQU="
            ],
            "Channel 15": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABIpITERMSExISEhMSExISEhMSEjcTNhM2EzcSNxI3ExISNxI3ExISNxISExITEhISExITEhI3EhITNxI3EjcTNhM2EwAFSQABJkoSAAxRAAElSRMADQU="
            ],
            "Channel 16": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABIZIUERMSEhITEhISExITEhISEzYTNxI3EzYTNhM3EhITNhMSEzYTNhMSExISEhMSExISNxISExITNhM2EzcSNxM2EwAFSQABJkoSAAxSAAEkSRMADQU="
            ],
            "Channel 17": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABJJAVEBUPFRAVEBQQFRAVDxUQFTQVNBU1FDUVNBU0FRAVNBU0FTQVNRQQFRAVEBQQFRAVDxUQFRAUNRU0FTQVNBU1FQAFQwABKUYWAAxJAAEpRxUADQU="
            ],
            "Channel 18": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABJJAVEBQQFRAUEBUQFRAUEBUQFTQVNBU1FDUUNRM2ExISNxMSEhITEhI3ExISEhMSExISNxI3EzcSEhI3EzYTNhM3EgAFRgABJkkTAAxMAAEmShIADQU="
            ],
            "Channel 19": [
                "JgBYAAABJpIUERQQFDYUERMRFBEUERMRFDYUNRQRFDUUNhM2FDUUNhQ1FBEUERMRFDYTERQRFBEUERM2FDUUNhMRFDYUNRQ2EwAFIgABJ0oTAAxNAAEnShQADQU=",
                "JgBYAAABIZIUERISExISEhMSExISEhMSEzYTNhM3EjcSNxM2ExISNxM2ExISEhM3EhITEhMSEhITEhI3EzYTEhM2EzYTNxI3EgAFRgABJkoSAAxMAAEmSRMADQU="
            ]
        }
    }
}

image