From c2123a0a906720e1b6c63432d93d793618d67ced Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 7 Aug 2023 02:53:31 -0700 Subject: [PATCH] Dismiss configuration check result on leaving page (#17466) --- .../yaml_configuration/developer-yaml-config.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts b/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts index 50bc2e2d60..9d1545b1a4 100644 --- a/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts +++ b/src/panels/developer-tools/yaml_configuration/developer-yaml-config.ts @@ -36,6 +36,12 @@ export class DeveloperYamlConfig extends LitElement { private _validateLog = ""; + public disconnectedCallback() { + super.disconnectedCallback(); + this._isValid = null; + this._validateLog = ""; + } + protected updated(changedProperties) { const oldHass = changedProperties.get("hass"); if ( @@ -172,6 +178,9 @@ export class DeveloperYamlConfig extends LitElement { const configCheck = await checkCoreConfig(this.hass); this._validating = false; + if (!this.isConnected) { + return; + } this._isValid = configCheck.result === "valid"; if (configCheck.errors) {