Prevent voice settings to override entity registry settings dialog (#17485)

This commit is contained in:
Bram Kragten 2023-08-04 15:09:20 +02:00
parent d6de29ca8a
commit 060e67397a
2 changed files with 52 additions and 49 deletions

View File

@ -411,7 +411,8 @@ export class MoreInfoDialog extends LitElement {
@entity-entry-updated=${this._entryUpdated} @entity-entry-updated=${this._entryUpdated}
@toggle-edit-mode=${this._handleToggleInfoEditModeEvent} @toggle-edit-mode=${this._handleToggleInfoEditModeEvent}
> >
${this._childView ${cache(
this._childView
? html` ? html`
<div class="child-view"> <div class="child-view">
${dynamicElement(this._childView.viewTag, { ${dynamicElement(this._childView.viewTag, {
@ -421,8 +422,7 @@ export class MoreInfoDialog extends LitElement {
})} })}
</div> </div>
` `
: cache( : this._currView === "info"
this._currView === "info"
? html` ? html`
<ha-more-info-info <ha-more-info-info
dialogInitialFocus dialogInitialFocus

View File

@ -186,7 +186,10 @@ export class EntityRegistrySettingsEditor extends LitElement {
protected willUpdate(changedProperties: PropertyValues) { protected willUpdate(changedProperties: PropertyValues) {
super.willUpdate(changedProperties); super.willUpdate(changedProperties);
if (!changedProperties.has("entry")) { if (
!changedProperties.has("entry") ||
changedProperties.get("entry")?.id === this.entry.id
) {
return; return;
} }