Entity Button card

have I read this wrong? I figured this would be a press to toggle on/off or call a service, but it all does for me is pop up a window

type: entity-button
icon: mdi:hotel
title: Turn Off Lights
entity: script.1540688444146
service: script.turn_on

I was hoping this would toggle on the script.
I also tried

type: entity-button
icon: mdi:hotel
tap-action: call-sevice
title: Turn Off Lights
entity: scene.bedtime
service: scene.turn_on
service_data: scene.bedtime

and as always its me not reading properly missed an underscore (had a hyphen) on “tap action”

type: entity-button
icon: mdi:hotel
title: Turn Off Lights
entity: script.1540688444146
tap_action: call-service
service: script.turn_on

Sorry to jump in on your thread but I’m having trouble with an entity-button card and I wondered if you, or one of the other members will be able to help.

I have the code below but I’m getting an error on my Lovelace UI saying “Unknown card type encountered: entity-button”.

All the support documentation is showing light entities. Can someone tell me if what I’m trying to achieve is possible and if there’s any obvious reasons why I’m getting the error?

  - title: Basic
    id: basic
    background: radial-gradient(grey, skyblue)
    theme: dark-mode
    cards:
      - type: entity-button
        name: Heating
        entity: input_boolean.heating_switch
        tap_action: toggle
        icon: mdi:fire
      
      - type: entity-button
        name: Cupboard Light
        entity: switch.cupboard_led
        tap_action: toggle
        icon: mdi:lightbulb

You should have the latest version of HA

I can’t believe it was as simple as that!! :laughing::laughing:

I’ve been using Hassbian, so fell behind with my updates. I recently went back to Hassio so now have latest version. I hadn’t even checked to see if it was working in Lovelace becauase the entity button card was on a different tab.

I just read your post now, checked in Lovelace and it’s working fine! Thanks for taking the time to respond :+1:

One thing that drive’s me crazy is to get status of input boolean in entity button.
In custom button card I do get state of boolean but not with official button card

  - type: entity-button
    entity: input_boolean.automode_centralno
    name: Centralno
    tap_action: toggle
    show_state: true

Or how to get state from switch, but call a script?
Anyone has solution for that?

You mean this :
image

Left one is an input_boolean, right a switch (TPLink plug indeed).

    - type: entity-button
      entity: input_boolean.lavage
      show_state: true
    - type: entity-button
      entity: switch.lave_linge
      hold_action: toggle

Input_boolean, calendar entries, device_tracker… don’t change when they turn on. Seems like only the switch do ?

1 Like

Input_boolean, calendar entries, device_tracker… don’t change when they turn on. Seems like only the switch do ?
I’m experiencing the same. Would be good to get at least input_boolean also changed on status.

1 Like