Entity Button Card


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

Screenshot of the entity button card Screenshot of the Entity Button card.

type: entity-button
entity: light.living_room

Configuration Variables

type

(string)(Required)

entity-button

entity

(string)(Required)

Home Assistant entity ID.

name

(string)(Optional)

Overwrites friendly name.

Default value:

Name of Entity

icon

(string)(Optional)

Overwrites icon or entity picture.

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 config ui. (Advanced users can use other CSS values if they like)

Default value:

auto

tap_action

(map)(Optional)

Action to take on tap

action

(string)(Required)

Action to perform (more-info, toggle, call-service, navigate, none)

Default value:

toggle

navigation_path

(string)(Optional)

Path to navigate to (e.g. /lovelace/0/) when action defined as navigate

Default value:

none

service

(string)(Optional)

Service to call (e.g. media_player.media_play_pause) when action defined as call-service

Default value:

none

service_data

(string)(Optional)

Service data to include (e.g. entity_id: media_player.bedroom) when action defined as call-service

Default value:

none

hold_action

(map)(Optional)

Action to take on tap-and-hold

action

(string)(Required)

Action to perform (more-info, toggle, call-service, navigate, none)

Default value:

more-info

navigation_path

(string)(Optional)

Path to navigate to (e.g. /lovelace/0/) when action defined as navigate

Default value:

none

service

(string)(Optional)

Service to call (e.g. media_player.media_play_pause) when action defined as call-service

Default value:

none

service_data

(string)(Optional)

Service data to include (e.g. entity_id: media_player.bedroom) when action defined as call-service

Default value:

none

theme

(string)(Optional)

Set to any theme within themes.yaml

Examples

Title and Script Service Example:

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

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