From c06357a351377906b57bf6fd8641292d2646f8d6 Mon Sep 17 00:00:00 2001 From: Bram Kragten Date: Thu, 10 Sep 2020 21:47:18 +0200 Subject: [PATCH] Only show what triggered a change if it wasn't a user (#6919) * Only show what triggered a change if it wasn't a user * Update ha-logbook.ts --- src/panels/logbook/ha-logbook.ts | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/panels/logbook/ha-logbook.ts b/src/panels/logbook/ha-logbook.ts index 33269319b6..e94fd7c72d 100644 --- a/src/panels/logbook/ha-logbook.ts +++ b/src/panels/logbook/ha-logbook.ts @@ -149,20 +149,23 @@ class HaLogbook extends LitElement { > ` : ""} - ${item.message} - ${item_username ? ` (${item_username})` : ``} - ${!item.context_event_type + ${item.message} + ${item_username + ? ` by ${item_username}` + : !item.context_event_type ? "" : item.context_event_type === "call_service" ? // Service Call - html` by service + ` by service ${item.context_domain}.${item.context_service}` : item.context_entity_id === item.entity_id ? // HomeKit or something that self references - html` by - ${item.context_name - ? item.context_name - : item.context_event_type}` + ` by + ${ + item.context_name + ? item.context_name + : item.context_event_type + }` : // Another entity such as an automation or script html` by