Add timeout to dev template renders (#7141)

This commit is contained in:
J. Nick Koston 2020-09-28 08:45:38 -05:00 committed by GitHub
parent 4759c89628
commit 50e03d41ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -18,6 +18,7 @@ export const subscribeRenderTemplate = (
template: string;
entity_ids?: string | string[];
variables?: object;
timeout?: number;
}
): Promise<UnsubscribeFunc> => {
return conn.subscribeMessage((msg: RenderTemplateResult) => onChange(msg), {

View File

@ -296,6 +296,7 @@ class HaPanelDevTemplate extends LitElement {
},
{
template: this._template,
timeout: 3,
}
);
await this._unsubRenderTemplate;