Entities Card


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

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)

Button to turn on/off all entities.

Default value:

true

theme

(string)(Optional)

Set to any theme within themes.yaml.

state_color

(boolean)(Optional)

Set to true to have icons colored when entity is active

Default value:

false

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-triggered (only for automations and scripts).

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)

Set to true to have icons colored when entity is active

Default value:

false

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

Call Service

Configuration Variables

type

(string)(Required)

call-service

name

(string)(Required)

Main Label.

service

(string)(Required)

Service like media_player.media_play_pause

icon

(string)(Optional)

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

Default value:

mdi:remote

action_name

(string)(Optional)

Button label.

Default value:

Run

service_data

(map)(Optional)

The service data to use.

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)

Name to show in the row

Default value:

Home Assistant Cast

icon

(string)(Optional)

Icon to use

Default value:

hass:television

hide_if_unavailable

(boolean)(Optional)

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

Default value:

false

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

(string)(Optional)

Style the element using CSS.

Default value:

height: 1px, background-color: var(–secondary-text-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)

Link label

Default value:

URL path

icon

(string)(Optional)

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

Default value:

mdi:link

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
Please be aware that the entity types divider and weblink aren't yet supported by the UI editor and a warning about `Expected a value of type...` is shown. You can ignore the warning and save your edits to verify.