Guard load diagnostics (#11518)

This commit is contained in:
Paulus Schoutsen 2022-02-03 00:59:04 -08:00 committed by GitHub
parent 5e80a2b465
commit 19e1eaf2d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,6 +201,10 @@ export class HaConfigDevicePage extends LitElement {
}
private async _renderDiagnosticButtons(requestId: number): Promise<void> {
if (!isComponentLoaded(this.hass, "diagnostics")) {
return;
}
const device = this._device(this.deviceId, this.devices);
if (!device) {