Fix entity settings for entity with no entity reg (#15577)

This commit is contained in:
Bram Kragten 2023-02-24 09:29:20 +01:00 committed by GitHub
parent 7724fa02d7
commit 682f383c9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,7 @@ export class MoreInfoDialog extends LitElement {
@state() private _childView?: ChildView; @state() private _childView?: ChildView;
@state() private _entry?: ExtEntityRegistryEntry; @state() private _entry?: ExtEntityRegistryEntry | null;
public showDialog(params: MoreInfoDialogParams) { public showDialog(params: MoreInfoDialogParams) {
this._entityId = params.entityId; this._entityId = params.entityId;
@ -99,10 +99,14 @@ export class MoreInfoDialog extends LitElement {
if (!this._entityId) { if (!this._entityId) {
return; return;
} }
this._entry = await getExtendedEntityRegistryEntry( try {
this.hass, this._entry = await getExtendedEntityRegistryEntry(
this._entityId this.hass,
); this._entityId
);
} catch (e) {
this._entry = null;
}
} }
public closeDialog() { public closeDialog() {