Entities Card


The Entities card is the most common type of card. It groups items together into lists.

To add the Entities card to your user interface, click the Lovelace menu (three dots at the top right of the screen) and then Edit Dashboard. Click the plus button in the bottom right corner and select Entities from the card picker.

Configuration Variables

type string Required

entities

entities list Required

A list of entity IDs or entity objects, see below.

title string (Optional)

The card title.

icon string (Optional)

An icon to display to the left of the title

show_header_toggle boolean (Optional, default: true)

Button to turn on/off all entities.

theme string (Optional)

Set to any theme within themes.yaml.

state_color boolean (Optional, default: false)

Set to true to have icons colored when entity is active

header map (Optional)

Header widget to render. See header documentation.

footer map (Optional)

Footer widget to render. See footer documentation.

Options For Entities

If you define entities as objects instead of strings (by adding entity: before entity ID), you can add more customization and configuration:

Configuration Variables

entity string Required

Home Assistant entity ID.

type string (Optional)

Sets a custom card type: custom:my-custom-card

name string (Optional)

Overwrites friendly name.

icon string (Optional)

Overwrites icon or entity picture.

image string (Optional)

Overwrites entity picture.

secondary_info string (Optional)

Show additional info. Values: entity-id, last-changed, last-updated, last-triggered (only for automations and scripts), position or tilt-position (only for supported covers), brightness (only for lights).

format string (Optional)

How the state should be formatted. Currently only used for timestamp sensors. Valid values are: relative, total, date, time and datetime.

header map (Optional)

Header widget to render. See header documentation.

footer map (Optional)

Footer widget to render. See footer documentation.

action_name string (Optional)

Button label. (Only applies to script and scene rows)

state_color boolean (Optional, default: false)

Set to true to have icons colored when entity is active

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.

Special Row Elements

Button

Configuration Variables

type string Required

button

name string Required

Main Label.

icon string (Optional)

An icon to display to the left of the label.

action_name string (Optional, default: Run)

Button label.

tap_action map Required

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.

Cast

Special row to start Home Assistant Cast.

Configuration Variables

type string Required

cast

dashboard string (Optional)

Path to the dashboard of the view that needs to be shown.

view string Required

Path to the view that needs to be shown.

name string (Optional, default: Home Assistant Cast)

Name to show in the row

icon string (Optional)

Icon to use

Default:

hass:television

hide_if_unavailable boolean (Optional, default: false)

Hide this row if casting is not available in the browser.

Conditional

Special row that displays based on entity states.

Configuration Variables

type string Required

conditional

conditions list Required

List of entity IDs and matching states.

entity string Required

HA entity ID.

state string (Optional)

Entity state is equal to this value.*

state_not string (Optional)

Entity state is unequal to this value.*

row map Required

Row to display if all conditions match.

*one is required (state or state_not)

Note: Conditions with more than one entity are treated as an ‘and’ condition. This means that for the card to show, all entities must meet the state requirements set.

Divider

Configuration Variables

type string Required

divider

style map (Optional)

Style the element using CSS.

Default:

height: 1px, background-color: var(–divider-color)

Section

Configuration Variables

type string Required

section

label string (Optional)

Section label

Weblink

Configuration Variables

type string Required

weblink

url string Required

Website URL (or internal URL e.g., /hassio/dashboard or /panel_custom_name)

name string (Optional, default: URL path)

Link label

icon string (Optional, default: mdi:link)

Icon to display (e.g., mdi:home)

Buttons

Configuration Variables

type string Required

buttons

entities list Required

A list of entities to show. Each entry is either an entity ID or a map.

entity string Required

The entity to render.

icon string (Optional)

Override the entity icon.

image string (Optional)

Override the entity image.

name string (Optional)

Label for the button

Attribute

Configuration Variables

type string Required

attribute

entity string Required

Home Assistant entity ID.

attribute string Required

Attribute to display from the entity.

prefix string (Optional)

Text before entity state.

suffix string (Optional)

Text after entity state.

name string (Optional)

Overwrites friendly name.

Example

Entity rows:

type: entities
title: Entities card sample
show_header_toggle: true
header:
  image: 'https://www.home-assistant.io/images/lovelace/header-footer/balloons-header.png'
  type: picture
entities:
  - entity: alarm_control_panel.alarm
    name: Alarm Panel
  - device_tracker.demo_paulus
  - switch.decorative_lights
  - group.all_lights
  - group.all_locks

Special rows:

type: entities
title: Entities card sample
show_header_toggle: true
entities:
  - type: call-service
    icon: mdi:power
    name: Bed light
    action_name: Toggle light
    service: light.toggle
    service_data:
      entity_id: light.bed_light
  - type: divider
  - type: weblink
    name: Home Assistant
    url: https://www.home-assistant.io/
    icon: mdi:home-assistant
  - type: button
    name: Power cycle LibreELEC
    icon: mdi:power-cycle
    tap_action:
      action: call-service
      confirmation:
        text: Are you sure you want to restart?
      service: script.libreelec_power_cycle