Rework the error message when entity is unavailable.

This commit is contained in:
Dermot Duffy
2022-07-24 19:36:32 -07:00
parent 53c262c056
commit d6f0282886
6 changed files with 148 additions and 60 deletions
+6 -2
View File
@@ -34,9 +34,13 @@ export class FrigateCardMessage extends LitElement {
</div>
<div class="contents">
<span class="${classMap(classes)}">
${this.message ? html`${this.message}` : ''}
${this.message
? html`${this.message}${this.context && typeof this.context === 'string'
? ': ' + this.context
: ''}`
: ''}
</span>
${this.context
${this.context && typeof this.context !== 'string'
? html`<pre>${JSON.stringify(this.context, null, 2)}</pre>`
: ''}
</div>