Dismiss configuration check result on leaving page (#17466)

This commit is contained in:
karwosts 2023-08-07 02:53:31 -07:00 committed by GitHub
parent e9e31d51ec
commit c2123a0a90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,12 @@ export class DeveloperYamlConfig extends LitElement {
private _validateLog = ""; private _validateLog = "";
public disconnectedCallback() {
super.disconnectedCallback();
this._isValid = null;
this._validateLog = "";
}
protected updated(changedProperties) { protected updated(changedProperties) {
const oldHass = changedProperties.get("hass"); const oldHass = changedProperties.get("hass");
if ( if (
@ -172,6 +178,9 @@ export class DeveloperYamlConfig extends LitElement {
const configCheck = await checkCoreConfig(this.hass); const configCheck = await checkCoreConfig(this.hass);
this._validating = false; this._validating = false;
if (!this.isConnected) {
return;
}
this._isValid = configCheck.result === "valid"; this._isValid = configCheck.result === "valid";
if (configCheck.errors) { if (configCheck.errors) {