Entity Names¶
When you don't set a name, the card shows the entity's name the same way the Home Assistant cards do (tile card, button card, ...). It follows your entity, device and area names, and updates when you rename any of them.
Info
This requires Home Assistant 2025.11 or later. On older versions, the card uses the entity's friendly_name.
Building the name from parts¶
Instead of a fixed text, name can be a list of parts. Each part is replaced by the matching name from Home Assistant, and the parts are joined with a space. Parts that don't exist for this entity are skipped.
| Part | Shows |
|---|---|
entity |
The name of the entity |
device |
The name of the device the entity belongs to |
parent_device |
The name of the parent device, for entities of a sub-device (for example the power strip of an outlet) |
area |
The name of the area |
floor |
The name of the floor |
text |
Your own text, set with text: |
type: custom:button-card
entity: sensor.living_room_temperature
name:
- type: text
text: Temperature in
- type: area
A single part works too:
This is the same format the Home Assistant card editor uses for names, so you can copy a name from the YAML of another card.
Parts can also be used for the name of a state.
With JS templates¶
A text part can be a JS template:
A JS template can also return parts:
name: |
[[[
if (entity.state === 'on') return [{ type: 'area' }, { type: 'entity' }];
return [{ type: 'entity' }];
]]]
With configuration templates¶
If both a configuration template and the card define a name, the card's name is used and the template's name is ignored.
This card shows only the device name. Without the name in the card, it would show the area and the entity names from the template.