Button Card


The Button card allows you to add buttons to perform tasks.

Screenshot of the button card Screenshot of the Button card.

type: button
entity: light.living_room

Configuration Variables

type

(string)(Required)

button

entity

(string)(Optional)

Home Assistant entity ID.

name

(string)(Optional)

Overwrites friendly name.

Default value:

Name of Entity

icon

(string)(Optional)

Icon that will be be used to overwrite the entity picture or entity icon.

Default value:

Entity Domain Icon

show_name

(boolean)(Optional)

Show name.

Default value:

true

show_icon

(boolean)(Optional)

Show icon.

Default value:

true

icon_height

(string)(Optional)

Set the height for the icon. This is in pixels which is handled by the configuration UI. (Advanced users can use other CSS values if they like)

Default value:

auto

state_color

(boolean)(Optional)

Set to true to have icons colored when entity is active

Default value:

true

tap_action

(map)(Optional)

Action taken on card tap. See action documentation.

hold_action

(map)(Optional)

Action taken on card tap and hold. See action documentation.

double_tap_action

(map)(Optional)

Action taken on card double tap. See action documentation.

theme

(string)(Optional)

Set to any theme within themes.yaml

Options For Exemptions

Configuration Variables

user

(string)(Required)

User id that can see the view tab.

Examples

Title and Script Service Example:

type: button
name: Turn Off Lights
tap_action:
  action: call-service
  service: script.turn_on
  service_data:
    entity_id: script.turn_off_lights

Screenshot of the button card Screenshot of the Button card with Title and Script Service.