Skip to content

Commit

Permalink
Prevent hui-image DEFAULT_FILTER from being applied when state="off"
Browse files Browse the repository at this point in the history
  • Loading branch information
queimadus committed Nov 15, 2021
1 parent 05808d8 commit 7e871c9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cover-icon-element.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class CoverIconElement extends HTMLElement {
this.prevImage = image;
this.img.setConfig({
...this._config,
// We need to set a non false-ish filter, otherwise the hui-image's
// DEFAULT_FILTER (greyscale(100%)) gets applied when entity state is 'off'
filter: this._config.filter || " ",
image: image
});
}
Expand Down

0 comments on commit 7e871c9

Please sign in to comment.