Fix more info with unnamed entity (#13859)

This commit is contained in:
Paul Bottein 2022-09-27 15:39:49 +02:00 committed by GitHub
parent cc76a6c5ed
commit 8d5c36a96a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ export class MoreInfoDialog extends LitElement {
const stateObj = this.hass.states[entityId];
const domain = computeDomain(entityId);
const name = stateObj ? computeStateName(stateObj) : entityId;
const name = (stateObj && computeStateName(stateObj)) || entityId;
const tabs = this._getTabs(entityId, this.hass.user!.is_admin);
return html`