Action toggle in custom:button-card for ESP32

Hey Guys,

I am having this weird issue and I don’t know how to get around it. I have made my buttons in the esp yaml but for some reason when I call-service or action toggle it doesn’t function. If i make a standard button it works fine?

Is there something I am missing?

# Buttons
button:
  - platform: template
    name: "LG TV - Power On"
    on_press:
      - remote_transmitter.transmit_pronto:
          transmitter_id: Port_1
          data: "0000 006d 0026 0000 0155 00aa 0016 0015 0016 0015 0016 0040 0016 0015 0016 0015 0016 0015 0016 0014 0016 0015 0016 0040 0016 0040 0016 0015 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0015 0016 0015 0016 0040 0016 0015 0016 0015 0016 0015 0016 0040 0016 0040 0016 0040 0016 0040 0016 0015 0016 0040 0016 0040 0016 0040 0016 0014 0016 0015 0016 060b 0155 0055 0016 0e58 0155 0055 0016 00aa"
  - platform: template
    name: "LG TV - Power Off"
    on_press:
      - remote_transmitter.transmit_pronto:
          transmitter_id: Port_1
          data: "0000 006d 0026 0000 0155 00aa 0016 0015 0016 0015 0016 0040 0016 0015 0016 0015 0016 0014 0016 0014 0016 0015 0016 0040 0016 0040 0016 0015 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0040 0016 0014 0016 0040 0016 0015 0016 0015 0016 0014 0016 0040 0016 0040 0016 0014 0016 0040 0016 0015 0016 0040 0016 0040 0016 0040 0016 0014 0016 0015 0016 060b 0155 0055 0016 0e58 0155 0055 0016 00aa"

The service in home assistant is button press, not toggle.

1 Like

I swear I have searched high and low and couldn’t find that section… Thank you soo much.

Well maybe I jumped the gun a bit on this one. I changed it to the following and still get failed service error.

card_type: horizontal-stack
cards:
  - entity: button.esp32_1_lg_power_on
    name: TEST
    service: button.press
    target:
      entity_id: button.esp32_1_lg_power_on
    template: menu_button
    type: custom:button-card

I have tried it few different ways and still not allowing me to.

Here is some additional information that maybe someone can assist figuring out what is different so it doesn’t work.

Example with button that works fine, however if I make it custom:button-card says failed to call service.

show_name: false
show_icon: true
type: button
tap_action:
  action: call-service
  service: button.press
  target:
    entity_id: button.esp32_1_lg_tv_power_on
entity: button.esp32_1_lg_tv_power_on
hold_action:
  action: none
icon: mdi:power
show_state: false
icon_height: 25px

The custom-button card has not been updated in ages. Essentially it is abandoned. You should look for an alternative.

Any suggestions I can’t remember reason why I did it.

Well if the core button card works use it.