Don't try load_lovelace until it succeeds.
This commit is contained in:
parent
ffc8d5fc2e
commit
9fcfff81c6
File diff suppressed because one or more lines are too long
@ -37,8 +37,14 @@ class BrowserMod {
|
|||||||
window.browser_mod.playedOnce = true;
|
window.browser_mod.playedOnce = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_load_lovelace() {
|
||||||
|
if(!load_lovelace()) {
|
||||||
|
let timer = window.setTimeout(this._load_lovelace.bind(this), 100);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
window.setTimeout(load_lovelace, 500);
|
window.setTimeout(this._load_lovelace.bind(this), 500);
|
||||||
window.hassConnection.then((conn) => this.connect(conn.conn));
|
window.hassConnection.then((conn) => this.connect(conn.conn));
|
||||||
this.player = new Audio();
|
this.player = new Audio();
|
||||||
this.playedOnce = false;
|
this.playedOnce = false;
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -627,7 +627,7 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"card-tools": {
|
"card-tools": {
|
||||||
"version": "github:thomasloven/lovelace-card-tools#a38da04024d3b9411d706e10883e9281cd9c3426",
|
"version": "github:thomasloven/lovelace-card-tools#8790289006f110d7aefb8cf7ab1bacdad3c620b0",
|
||||||
"from": "github:thomasloven/lovelace-card-tools"
|
"from": "github:thomasloven/lovelace-card-tools"
|
||||||
},
|
},
|
||||||
"chalk": {
|
"chalk": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user