From 7d8b418a810266e75a7931fbdf76ffe711009fad Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Mon, 28 Jul 2025 23:50:58 -0700 Subject: [PATCH] Fix some instability in ha-selector-object (#26301) Fix some instability in ha-object-selector --- src/components/ha-selector/ha-selector-object.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ha-selector/ha-selector-object.ts b/src/components/ha-selector/ha-selector-object.ts index a08e0a4c4e..2b321e458a 100644 --- a/src/components/ha-selector/ha-selector-object.ts +++ b/src/components/ha-selector/ha-selector-object.ts @@ -15,6 +15,7 @@ import "../ha-md-list-item"; import "../ha-sortable"; import "../ha-yaml-editor"; import type { HaYamlEditor } from "../ha-yaml-editor"; +import { deepEqual } from "../../common/util/deep-equal"; @customElement("ha-selector-object") export class HaObjectSelector extends LitElement { @@ -271,7 +272,8 @@ export class HaObjectSelector extends LitElement { if ( changedProps.has("value") && !this._valueChangedFromChild && - this._yamlEditor + this._yamlEditor && + !deepEqual(this.value, changedProps.get("value")) ) { this._yamlEditor.setValue(this.value); }