Area¶
An area shows where an entity belongs in the home, such as Living room, Kitchen, or Bedroom. Use it to add that location to a card.
The displayed area follows the entity selected with entity_index.
Basic configuration¶
Add areas under layout.areas:
entity_index selects the entity whose area is displayed.
xpos and ypos position the area text on the card.
Configuration options¶
| Field | Required | Description |
|---|---|---|
entity_index | Yes | Entity whose area is displayed |
xpos | Yes | Horizontal position on the card |
ypos | Yes | Vertical position on the card |
ellipsis | No | Maximum displayed text length |
styles | No | Text styling |
color_stops | No | Colors the text from the entity state |
Where the area comes from¶
Flexible Horseshoe Card uses the Home Assistant area assigned to the entity.
If the entity itself has no area, the area assigned to its device is used.
You can override the displayed area in the entity configuration:
Size and position¶
Position the area with xpos and ypos:
Use text-anchor to align the text around its position:
start— text starts atxposmiddle— text is centered onxposend— text ends atxpos
See Positioning and sizing for the card coordinate system.
Text appearance¶
Use styles to change the appearance of the area:
Common styles include:
| Property | Use |
|---|---|
font-size | Text size |
font-weight | Text weight |
text-anchor | Horizontal alignment |
text-transform | Text capitalization |
fill | Text color |
opacity | Text opacity |
See Styling for the complete styling guide.
Shorten long area names¶
Use ellipsis to limit the displayed length:
Longer area names are shortened with an ellipsis.
Color from the entity¶
An area can change color with the state of its entity:
Area color stops are applied to the text.
See Color stops for ranges, gradients, palettes, and interpolation.