Entities Card


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

Configuration Variables

type stringRequired

entities

entities listRequired

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 stringRequired

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), 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 stringRequired

button

name stringRequired

Main Label.

action_name string(Optional, default: Run)

Button label.

tap_action mapRequired

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 stringRequired

cast

dashboard string(Optional)

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

view stringRequired

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 stringRequired

conditional

conditions listRequired

List of entity IDs and matching states.

entity stringRequired

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 mapRequired

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 stringRequired

divider

style map(Optional)

Style the element using CSS.

Default:

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

Section

Configuration Variables

type stringRequired

section

label string(Optional)

Section label

Weblink

Configuration Variables

type stringRequired

weblink

url stringRequired

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 stringRequired

buttons

entities listRequired

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

entity stringRequired

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 stringRequired

attribute

entity stringRequired

Home Assistant entity ID.

attribute stringRequired

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
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.