Skip to content

Commit

Permalink
Prevent voice settings to override entity registry settings dialog (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bramkragten authored Aug 4, 2023
1 parent 7b6d910 commit 0d630aa
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 49 deletions.
96 changes: 48 additions & 48 deletions src/dialogs/more-info/ha-more-info-dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,54 +411,54 @@ export class MoreInfoDialog extends LitElement {
@entity-entry-updated=${this._entryUpdated}
@toggle-edit-mode=${this._handleToggleInfoEditModeEvent}
>
${this._childView
? html`
<div class="child-view">
${dynamicElement(this._childView.viewTag, {
hass: this.hass,
entry: this._entry,
params: this._childView.viewParams,
})}
</div>
`
: cache(
this._currView === "info"
? html`
<ha-more-info-info
dialogInitialFocus
.hass=${this.hass}
.entityId=${this._entityId}
.entry=${this._entry}
.editMode=${this._infoEditMode}
></ha-more-info-info>
`
: this._currView === "history"
? html`
<ha-more-info-history-and-logbook
.hass=${this.hass}
.entityId=${this._entityId}
></ha-more-info-history-and-logbook>
`
: this._currView === "settings"
? html`
<ha-more-info-settings
.hass=${this.hass}
.entityId=${this._entityId}
.entry=${this._entry}
></ha-more-info-settings>
`
: this._currView === "related"
? html`
<ha-related-items
.hass=${this.hass}
.itemId=${entityId}
.itemType=${SearchableDomains.has(domain)
? domain
: "entity"}
></ha-related-items>
`
: nothing
)}
${cache(
this._childView
? html`
<div class="child-view">
${dynamicElement(this._childView.viewTag, {
hass: this.hass,
entry: this._entry,
params: this._childView.viewParams,
})}
</div>
`
: this._currView === "info"
? html`
<ha-more-info-info
dialogInitialFocus
.hass=${this.hass}
.entityId=${this._entityId}
.entry=${this._entry}
.editMode=${this._infoEditMode}
></ha-more-info-info>
`
: this._currView === "history"
? html`
<ha-more-info-history-and-logbook
.hass=${this.hass}
.entityId=${this._entityId}
></ha-more-info-history-and-logbook>
`
: this._currView === "settings"
? html`
<ha-more-info-settings
.hass=${this.hass}
.entityId=${this._entityId}
.entry=${this._entry}
></ha-more-info-settings>
`
: this._currView === "related"
? html`
<ha-related-items
.hass=${this.hass}
.itemId=${entityId}
.itemType=${SearchableDomains.has(domain)
? domain
: "entity"}
></ha-related-items>
`
: nothing
)}
</div>
</ha-dialog>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ export class EntityRegistrySettingsEditor extends LitElement {

protected willUpdate(changedProperties: PropertyValues) {
super.willUpdate(changedProperties);
if (!changedProperties.has("entry")) {
if (
!changedProperties.has("entry") ||
changedProperties.get("entry")?.id === this.entry.id
) {
return;
}

Expand Down

0 comments on commit 0d630aa

Please sign in to comment.