mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
Logbook: fix custom Icon (#7175)
This commit is contained in:
parent
ec920093d4
commit
2c827bab9a
@ -18,7 +18,7 @@ export const binarySensorIcon = (state?: string, stateObj?: HassEntity) => {
|
||||
case "garage_door":
|
||||
return is_off ? "hass:garage" : "hass:garage-open";
|
||||
case "power":
|
||||
return is_off ? "hass:power-off" : "hass:power-on";
|
||||
return is_off ? "hass:power-plug" : "hass:power-plug-off";
|
||||
case "gas":
|
||||
case "problem":
|
||||
case "safety":
|
||||
|
@ -12,6 +12,7 @@ export interface LogbookEntry {
|
||||
name: string;
|
||||
message?: string;
|
||||
entity_id?: string;
|
||||
icon?: string;
|
||||
domain: string;
|
||||
context_user_id?: string;
|
||||
context_event_type?: string;
|
||||
|
@ -134,7 +134,8 @@ class HaLogbook extends LitElement {
|
||||
${!this.noIcon
|
||||
? html`
|
||||
<ha-icon
|
||||
.icon=${domainIcon(
|
||||
.icon=${item.icon ??
|
||||
domainIcon(
|
||||
item.entity_id
|
||||
? computeDomain(item.entity_id)
|
||||
: item.domain,
|
||||
|
Loading…
x
Reference in New Issue
Block a user