Fix missing logbook icons (#10423)

This commit is contained in:
Joakim Sørensen 2021-10-27 15:39:39 +02:00 committed by GitHub
parent 4a7a81ffdb
commit dc9182e9ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,6 @@ import { formatTimeWithSeconds } from "../../common/datetime/format_time";
import { restoreScroll } from "../../common/decorators/restore-scroll"; import { restoreScroll } from "../../common/decorators/restore-scroll";
import { fireEvent } from "../../common/dom/fire_event"; import { fireEvent } from "../../common/dom/fire_event";
import { computeDomain } from "../../common/entity/compute_domain"; import { computeDomain } from "../../common/entity/compute_domain";
import { domainIcon } from "../../common/entity/domain_icon";
import { computeRTL, emitRTLDirection } from "../../common/util/compute_rtl"; import { computeRTL, emitRTLDirection } from "../../common/util/compute_rtl";
import "../../components/entity/state-badge"; import "../../components/entity/state-badge";
import "../../components/ha-circular-progress"; import "../../components/ha-circular-progress";
@ -151,12 +150,12 @@ class HaLogbook extends LitElement {
html` html`
<state-badge <state-badge
.hass=${this.hass} .hass=${this.hass}
.overrideIcon=${item.icon ?? .overrideIcon=${item.icon}
domainIcon(domain, stateObj, item.state)}
.overrideImage=${DOMAINS_WITH_DYNAMIC_PICTURE.has(domain) .overrideImage=${DOMAINS_WITH_DYNAMIC_PICTURE.has(domain)
? "" ? ""
: stateObj?.attributes.entity_picture_local || : stateObj?.attributes.entity_picture_local ||
stateObj?.attributes.entity_picture} stateObj?.attributes.entity_picture}
.stateObj=${stateObj}
></state-badge> ></state-badge>
` `
: ""} : ""}