Skip to content

Commit

Permalink
fix: disable icon on entity none
Browse files Browse the repository at this point in the history
  • Loading branch information
motorlatitude committed Dec 16, 2024
1 parent 6db4ff5 commit 2a0360d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ class MiniGraphCard extends LitElement {
}

const { icon, icon_adaptive_color } = this.config.show;
return icon ? html`
return icon && this.entity[0] ? html`
<div class="icon" loc=${this.config.align_icon}
style=${icon_adaptive_color ? `color: ${this.color};` : ''}>
<ha-icon .icon=${this.computeIcon(this.entity[0])}></ha-icon>
Expand Down

0 comments on commit 2a0360d

Please sign in to comment.