Smart Entity Binding.
Every block in CardBuilder can connect to a Home Assistant entity. Set one entity at the card root and it flows down automatically to every child — just like CSS inheritance. Or pin any block to its own specific entity. Your choice, your control.
- 3
- Entity modes
- 1
- Entity to rule them all
- CSS
- Inheritance model
- Jinja2
- Template support
One System, Full Flexibility
Every block has an entity mode. Three modes cover every use case — from simple cards that just work to complex reusable templates.
Inherited
The block automatically uses the entity of its nearest ancestor that has one configured. This is the default for all blocks — zero configuration required.
Why it matters
Set one entity on the card root and every child block just works, instantly.
Slot
The block reads from a named entity slot — a placeholder filled in when the card is placed on a dashboard. Different dashboard instances can use different entities with the same card design.
Why it matters
Turn any card into a reusable template without changing a single block.
Fixed
The block is hardcoded to a specific entity ID that never changes, regardless of what the parent blocks are configured with.
Why it matters
Perfect for blocks that always show a specific sensor, regardless of card context.
Set Once, Works Everywhere
Inheritance is modelled on CSS — an entity set at a parent level flows down automatically to all descendants. You configure the entity once and every block in the tree benefits from it.
How it works
When a block's mode is Inherited, CardBuilder walks up the block tree from that block to the card root, and uses the entity of the first ancestor that has one explicitly configured — either Fixed or Slot.
Override at any level
You can set a different entity on any container mid-tree. Children of that container will use its entity instead. This lets you compose complex cards with multiple entity contexts.
Live example
Not Just Entities — Properties Too
The binding system goes further than entity selection. Individual block properties — text content, image source, icon, and more — can be dynamically bound to entity state values.
Bind any text property
Connect a text property directly to an entity's state or attribute. No templates needed for the simplest cases.
Jinja2 template support
For complex formatting, write a Jinja2 template using {{ state }}, {{ name }}, {{ entity_id }}, and {{ value }} keywords.
Conditional visibility
Property fields show only when relevant — keeping the interface clean and the configuration focused.
Property binding uses the same powerful binding engine as Style Bindings. See the Dynamic Style Binding feature for the full picture.
Learn about Style Bindings →Full Template Power When You Need It
Text properties with template support let you format and compose output exactly the way you want — using the same Jinja2 syntax you already know from Home Assistant.
| Keyword | Description |
|---|---|
| {{ state }} | The entity's current raw state value |
| {{ name }} | The entity's friendly name |
| {{ entity_id }} | The full entity ID string |
| {{ value }} | The formatted display value (context-dependent) |
Template
Room: {{ name }} — {{ state }}°C
Output
Room: Living Room — 22.5°C
One Entity. The Whole Card.
Install CardBuilder and see how a single entity configuration fills an entire card with live Home Assistant data.