Fix icon overrides in logbook (#10434)

This commit is contained in:
Joakim Sørensen 2021-10-28 13:43:14 +02:00 committed by GitHub
parent f5417fad6f
commit 8b5b21ae69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -80,16 +80,14 @@ export class StateBadge extends LitElement {
this._showIcon = true; this._showIcon = true;
if (stateObj) { if (stateObj && this.overrideImage === undefined) {
// hide icon if we have entity picture // hide icon if we have entity picture
if ( if (
((stateObj.attributes.entity_picture_local || (stateObj.attributes.entity_picture_local ||
stateObj.attributes.entity_picture) && stateObj.attributes.entity_picture) &&
!this.overrideIcon) || !this.overrideIcon
this.overrideImage
) { ) {
let imageUrl = let imageUrl =
this.overrideImage ||
stateObj.attributes.entity_picture_local || stateObj.attributes.entity_picture_local ||
stateObj.attributes.entity_picture; stateObj.attributes.entity_picture;
if (this.hass) { if (this.hass) {

View File

@ -156,6 +156,7 @@ class HaLogbook extends LitElement {
: stateObj?.attributes.entity_picture_local || : stateObj?.attributes.entity_picture_local ||
stateObj?.attributes.entity_picture} stateObj?.attributes.entity_picture}
.stateObj=${stateObj} .stateObj=${stateObj}
.stateColor=${false}
></state-badge> ></state-badge>
` `
: ""} : ""}