Try load_lovelace until it succeeds.

This commit is contained in:
thomas committed 2019-12-07 21:20:18 +01:00
1 parent 605caa906c
commit a38da04024
2 files changed
+43 -60

No files matched your search

+4 -2
View File
@@ -44,7 +44,10 @@ export function load_lovelace() {
if(customElements.get("hui-view")) return true;
const res = document.createElement("partial-panel-resolver");
res.hass = hass();
res.hass = undefined;
while(!res.hass || !res.hass.panels) {
res.hass = hass();
}
res.route = {path: "/lovelace/"};
res._updateRoutes();
try {
@@ -55,5 +58,4 @@ export function load_lovelace() {
}
if(customElements.get("hui-view")) return true;
return false;
}