Logbook: fix custom Icon (#7175)

This commit is contained in:
Zack Barett
2020-10-01 13:55:27 +02:00
committed by GitHub
parent ec920093d4
commit 2c827bab9a
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -18,7 +18,7 @@ export const binarySensorIcon = (state?: string, stateObj?: HassEntity) => {
case "garage_door": case "garage_door":
return is_off ? "hass:garage" : "hass:garage-open"; return is_off ? "hass:garage" : "hass:garage-open";
case "power": case "power":
return is_off ? "hass:power-off" : "hass:power-on"; return is_off ? "hass:power-plug" : "hass:power-plug-off";
case "gas": case "gas":
case "problem": case "problem":
case "safety": case "safety":
+1
View File
@@ -12,6 +12,7 @@ export interface LogbookEntry {
name: string; name: string;
message?: string; message?: string;
entity_id?: string; entity_id?: string;
icon?: string;
domain: string; domain: string;
context_user_id?: string; context_user_id?: string;
context_event_type?: string; context_event_type?: string;
+2 -1
View File
@@ -134,7 +134,8 @@ class HaLogbook extends LitElement {
${!this.noIcon ${!this.noIcon
? html` ? html`
<ha-icon <ha-icon
.icon=${domainIcon( .icon=${item.icon ??
domainIcon(
item.entity_id item.entity_id
? computeDomain(item.entity_id) ? computeDomain(item.entity_id)
: item.domain, : item.domain,