A pure JS client-side implementation of re-usable cards between Home Assistant Dashboards (excluding Overview).
In-Progress Documentation Site
Hey you! Help me out for a couple of :beers: or a :coffee:!
context
e.g. <%= context.name %>
Add through HACS
Name | Type | Requirement | Description | Default |
---|---|---|---|---|
type | string | Required | While normally required, this will be replaced | |
ll_template | string | Optional | ll_key name | `` |
ll_context | object | Optional | An object that can be accessed inside of EtaJS as context |
`` |
Name | Type | Requirement | Description | Default |
---|---|---|---|---|
type | string | Required | A normal Lovelace card type | |
ll_key | string | Required | The name you want to use for this template | `` |
ll_priority | number | Optional | Used in sorting the order that templates are added to the system for nesting. Lowest number comes first. | 0 |
Name | Type | Requirement | Description | Default |
---|---|---|---|---|
type | string | Required | custom:linked-lovelace-partials |
|
partials | list | Optional | A list of partials you want to use in Eta JS | `` |
A partial object has the following shape |
Name | Type | Requirement | Description | Default |
---|---|---|---|---|---|
key | string | Required | The name you want to use for this partial in Eta JS | ||
priority | number | Optional | Used in sorting the order that templates are added to the system for nesting. Lowest number comes first. | 0 |
|
url | string | Optional | A url that will have a GET request made to it, and have its response body used as template . |
`` | |
template | string | Required | The content that will be used as the Eta JS. If url is given, it will be downloaded and replace this. |
`` |
You no longer need "Template Dashboards". Make any top-level card in a view on any user-created dashboard a template by adding ll_key: template_name
to the config.
ll_priority: 0
. templateA
in templateB
, templateB
should have ll_priority: 1
to be rendered after templateA
has been added to our collection of available templates.template_data
or ll_data
must now be set to ll_context
template
must now be set to ll_template
ll_keys
mostly works still. two tests involving overriding context failed if someone wants to fix them. I'm considering removing this feature entirely.
To convert an old template data variable, $example$
, just swap the first $
to <%=
and the second $
to %>
, and retrieve the variable from context
.
<%= context.example %>