Show the entity id that first used the context in logbook

This commit is contained in:
J. Nick Koston 2020-08-23 17:00:27 -05:00
parent 22210b7400
commit 026fc1d2e3
2 changed files with 14 additions and 0 deletions

View File

@ -7,6 +7,8 @@ export interface LogbookEntry {
entity_id?: string; entity_id?: string;
domain: string; domain: string;
context_user_id?: string; context_user_id?: string;
context_entity_id?: string;
context_entity_id_name?: string;
} }
const DATA_CACHE: { const DATA_CACHE: {

View File

@ -118,6 +118,18 @@ class HaLogbook extends LitElement {
? ` (${item_username})` ? ` (${item_username})`
: ``}</span : ``}</span
> >
${!item.context_entity_id
? ""
: html`
by
<a
href="#"
@click=${this._entityClicked}
.entityId=${item.context_entity_id}
class="name"
>${item.context_entity_id_name}</a
>
`}
</div> </div>
</div> </div>
</div> </div>