mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
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
This commit is contained in:
parent
092a02a624
commit
c06357a351
@ -149,20 +149,23 @@ class HaLogbook extends LitElement {
|
||||
>
|
||||
`
|
||||
: ""}
|
||||
<span class="item-message">${item.message}</span>
|
||||
<span>${item_username ? ` (${item_username})` : ``}</span>
|
||||
${!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
|
||||
<a
|
||||
@ -258,7 +261,7 @@ class HaLogbook extends LitElement {
|
||||
color: var(--primary-text-color);
|
||||
}
|
||||
|
||||
.no-name .item-message {
|
||||
.no-name .message:first-letter {
|
||||
text-transform: capitalize;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user