diff --git a/src/panels/config/devices/ha-config-device-page.ts b/src/panels/config/devices/ha-config-device-page.ts index 30663f589..419ce7ecd 100644 --- a/src/panels/config/devices/ha-config-device-page.ts +++ b/src/panels/config/devices/ha-config-device-page.ts @@ -210,25 +210,27 @@ export class HaConfigDevicePage extends LitElement { } return Promise.all( - this._integrations(device, this.entries).map(async (entry) => { - const info = await fetchDiagnosticHandler(this.hass, entry.domain); + this._integrations(device, this.entries) + .filter((entry) => entry.state === "loaded") + .map(async (entry) => { + const info = await fetchDiagnosticHandler(this.hass, entry.domain); - if (!info.handlers.device && !info.handlers.config_entry) { - return ""; - } - const link = info.handlers.device - ? getDeviceDiagnosticsDownloadUrl(entry.entry_id, this.deviceId) - : getConfigEntryDiagnosticsDownloadUrl(entry.entry_id); - return html` - - - ${this.hass.localize( - `ui.panel.config.devices.download_diagnostics` - )} - - - `; - }) + if (!info.handlers.device && !info.handlers.config_entry) { + return ""; + } + const link = info.handlers.device + ? getDeviceDiagnosticsDownloadUrl(entry.entry_id, this.deviceId) + : getConfigEntryDiagnosticsDownloadUrl(entry.entry_id); + return html` + + + ${this.hass.localize( + `ui.panel.config.devices.download_diagnostics` + )} + + + `; + }) ); } diff --git a/src/panels/config/integrations/ha-integration-card.ts b/src/panels/config/integrations/ha-integration-card.ts index 33d20f9bf..4fafd3662 100644 --- a/src/panels/config/integrations/ha-integration-card.ts +++ b/src/panels/config/integrations/ha-integration-card.ts @@ -362,7 +362,7 @@ export class HaIntegrationCard extends LitElement { )} ` : ""} - ${this.supportsDiagnostics + ${this.supportsDiagnostics && item.state === "loaded" ? html`