Fetch cloud and updates on reconnect (#10808)

This commit is contained in:
Joakim Sørensen 2021-12-06 12:54:16 +01:00 committed by GitHub
parent f164d21c44
commit 66df15007a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -447,9 +447,19 @@ class HaPanelConfig extends HassRouterPage {
this.hass.loadBackendTranslation("title");
if (isComponentLoaded(this.hass, "cloud")) {
this._updateCloudStatus();
this.addEventListener("connection-status", (ev) => {
if (ev.detail === "connected") {
this._updateCloudStatus();
}
});
}
if (isComponentLoaded(this.hass, "hassio")) {
this._loadSupervisorUpdates();
this.addEventListener("connection-status", (ev) => {
if (ev.detail === "connected") {
this._loadSupervisorUpdates();
}
});
} else {
this._supervisorUpdates = null;
}