mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Lovelace markdown card - fix race condition, add variables to template (#3505)
* Fix connection race, add variables * Update src/panels/lovelace/cards/hui-markdown-card.ts * Lint
This commit is contained in:
parent
f64062d17b
commit
5de8c713c8
@ -48,11 +48,11 @@ export class HuiMarkdownCard extends LitElement implements LovelaceCard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._config = config;
|
this._config = config;
|
||||||
|
this._disconnect().then(() => {
|
||||||
this._disconnect();
|
if (this._hass) {
|
||||||
if (this._hass) {
|
this._connect();
|
||||||
this._connect();
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public disconnectedCallback() {
|
public disconnectedCallback() {
|
||||||
@ -91,6 +91,7 @@ export class HuiMarkdownCard extends LitElement implements LovelaceCard {
|
|||||||
{
|
{
|
||||||
template: this._config.content,
|
template: this._config.content,
|
||||||
entity_ids: this._config.entity_id,
|
entity_ids: this._config.entity_id,
|
||||||
|
variables: { config: this._config },
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
this._unsubRenderTemplate.catch(() => {
|
this._unsubRenderTemplate.catch(() => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user