mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Merge pull request #13353 from home-assistant/Make-sure-we-have-supervisor.addon
This commit is contained in:
commit
f5d9a7d662
@ -74,7 +74,7 @@ class HassioAddonDashboard extends LitElement {
|
|||||||
></hass-error-screen>`;
|
></hass-error-screen>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.addon) {
|
if (!this.addon || !this.supervisor?.addon) {
|
||||||
return html`<hass-loading-screen></hass-loading-screen>`;
|
return html`<hass-loading-screen></hass-loading-screen>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,6 +262,10 @@ class HassioAddonDashboard extends LitElement {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
if (!this.supervisor.addon) {
|
||||||
|
const addonsInfo = await fetchHassioAddonsInfo(this.hass);
|
||||||
|
fireEvent(this, "supervisor-update", { addon: addonsInfo });
|
||||||
|
}
|
||||||
this.addon = await fetchAddonInfo(this.hass, this.supervisor, addon);
|
this.addon = await fetchAddonInfo(this.hass, this.supervisor, addon);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this._error = `Error fetching addon info: ${extractApiErrorMessage(err)}`;
|
this._error = `Error fetching addon info: ${extractApiErrorMessage(err)}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user