Card naming
All dashboard cards and badges that use an entity support flexible name configuration. This allows you to display custom text, show contextual information like area or device names, or show only the entity name.
The name configuration helps you avoid redundant information (like repeating device names on every card) and create more contextual, easier-to-understand dashboards.
Default name
If you don’t set a name on a card or badge, it shows the default name of the entity. The default name is built from these parts, in this order:
- The name of the parent device, if the entity belongs to a child device
- The name of the device
- The name of the entity
For example, a Power entity of a smart plug device called Coffee machine is shown as Coffee machine Power.
If the entity represents the main function of its device and you turned on the attribute Main entity of the device, it has the device name and is shown as Coffee machine.
Some parts are left out when they would not help to identify the entity:
- If you assign the entity to an area directly, instead of letting it use the area of its device, the device name is left out.
For example, the
Outdoor temperaturesensor of a device calledHeating controlleris shown asHeating controller Outdoor temperature. If you assign the sensor to your outdoor area, it’s shown asOutdoor temperature. - If the entity belongs to a child device that has its own area assigned, the parent device name is left out. For example, the main entity of a socket (child device) called
Lampon a power strip (parent device) calledPower stripis shown asLampinstead ofPower strip Lamp.
To change the default name everywhere in Home Assistant, rename the entity or its device. To change the name only on one card or badge, set the name in the card or badge as described below.
Changing the name in the dashboard editor
- In the top-right corner of your dashboard, select Edit dashboard (
), then select on the card or badge you want to change. - If the editor has a Content section, expand it.
- In the Name field, choose how to build the name:
- To combine parts of the name, select Composed.
- To add a part, select Add, then select Entity, Device, Parent device, Area, or Floor. To add your own text, enter it in the search field and select it.
- To change the order, drag the parts.
- To remove a part, select its
button.
- To enter your own name, select Custom and enter the name.
- To combine parts of the name, select Composed.
- To go back to the default name, select Restore default name (
). - Select Save.
You can also set the name in YAML, as described in the following sections.
Simple string name
The simplest way to set a custom name is to use a string to override the entity’s display name.
name: "My custom name"
Name object
The name can also be configured as an object with a type property to display contextual information about the entity.
Entity name
Displays only the entity name. The entity name is the specific function or data point the entity represents, without the device or area name. If the entity is the main entity of its device and has no name of its own, the device name is shown instead.
name:
type: entity
This is useful when you want to avoid repeating the device name, for example, when the card is already grouped with other cards of the same device.
Device name
Displays the name of the device the entity belongs to.
name:
type: device
Parent device name
Displays the name of the parent device, if the entity belongs to a child device. For example, for a socket of a power strip, it shows the name of the power strip.
name:
type: parent_device
Area name
Displays the name of the area the entity is assigned to.
name:
type: area
Floor name
Displays the name of the floor where the entity’s area is located.
name:
type: floor
Custom text
Displays custom static text using the object syntax. This is useful when combining with other name types in a list.
name:
type: text
text: "My label"
Combining multiple name parts
You can combine multiple name components by using a list. This allows you to create hybrid names with contextual information. A space is automatically added between each component.
If a name component does not have a value, like when an entity has no area assigned, Home Assistant will automatically skip that component. This means only the components with values will be shown, and you will not see empty spaces or errors in the card name.
name:
- type: area
- type: device
This example would display something like “Living Room Light Switch”.
Examples
Simple string name
type: tile
entity: light.living_room_ceiling_light
name: "Ceiling light"
This is the simplest way to set a custom name, overriding the entity’s display name with a static string.
Using entity name to avoid repetition
type: tile
entity: sensor.living_room_sensor_temperature
name:
type: entity
This displays the entity name “Temperature” instead of the default name “Living room sensor Temperature”, avoiding repetition when the card is already grouped by area.
Combining device and area
type: tile
entity: media_player.living_room_tv
name:
- type: area
- type: device
This combines the area name with the device name, displaying something like “Living room TV”.
Using custom text with other name types
type: button
entity: switch.kitchen_lights
name:
- type: area
- type: text
text: "lights"
This would display “Kitchen lights” by combining the area name with custom text.