mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-21 08:16:36 +00:00
Add timeout to dev template renders (#7141)
This commit is contained in:
parent
4759c89628
commit
50e03d41ab
@ -18,6 +18,7 @@ export const subscribeRenderTemplate = (
|
|||||||
template: string;
|
template: string;
|
||||||
entity_ids?: string | string[];
|
entity_ids?: string | string[];
|
||||||
variables?: object;
|
variables?: object;
|
||||||
|
timeout?: number;
|
||||||
}
|
}
|
||||||
): Promise<UnsubscribeFunc> => {
|
): Promise<UnsubscribeFunc> => {
|
||||||
return conn.subscribeMessage((msg: RenderTemplateResult) => onChange(msg), {
|
return conn.subscribeMessage((msg: RenderTemplateResult) => onChange(msg), {
|
||||||
|
@ -296,6 +296,7 @@ class HaPanelDevTemplate extends LitElement {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
template: this._template,
|
template: this._template,
|
||||||
|
timeout: 3,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
await this._unsubRenderTemplate;
|
await this._unsubRenderTemplate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user