Fix some instability in ha-selector-object (#26301)

Fix some instability in ha-object-selector
This commit is contained in:
karwosts 2025-07-28 23:50:58 -07:00 committed by GitHub
parent c14425b2d1
commit 7d8b418a81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}