Logbook: fix custom Icon (#7175)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user