diff --git a/gallery/public/images/frenck.jpg b/gallery/public/images/frenck.jpg new file mode 100644 index 0000000000..777fcad09c Binary files /dev/null and b/gallery/public/images/frenck.jpg differ diff --git a/gallery/public/images/netflix.jpg b/gallery/public/images/netflix.jpg new file mode 100644 index 0000000000..3549edd995 Binary files /dev/null and b/gallery/public/images/netflix.jpg differ diff --git a/gallery/src/data/media_players.ts b/gallery/src/data/media_players.ts index f15e6949b6..a28f679c53 100644 --- a/gallery/src/data/media_players.ts +++ b/gallery/src/data/media_players.ts @@ -34,6 +34,7 @@ export const createMediaPlayerEntities = () => [ media_content_type: "movie", media_title: "Epic sax guy 10 hours", app_name: "YouTube", + entity_picture: "/images/frenck.jpg", supported_features: 33, }), getEntity("media_player", "living_room", "playing", { @@ -42,6 +43,7 @@ export const createMediaPlayerEntities = () => [ media_title: "Chapter 1", media_series_title: "House of Cards", app_name: "Netflix", + entity_picture: "/images/netflix.jpg", supported_features: 1, }), getEntity("media_player", "sonos_idle", "idle", { diff --git a/src/panels/lovelace/cards/hui-media-control-card.ts b/src/panels/lovelace/cards/hui-media-control-card.ts index 3d44e0895a..ec371db6de 100644 --- a/src/panels/lovelace/cards/hui-media-control-card.ts +++ b/src/panels/lovelace/cards/hui-media-control-card.ts @@ -694,8 +694,10 @@ export class HuiMediaControlCard extends LitElement implements LovelaceCard { return; } - Vibrant.from(this._image) - .useGenerator(customGenerator) + new Vibrant(this._image, { + colorCount: 16, + generator: customGenerator, + }) .getPalette() .then(([foreground, background]: [string, string]) => { this._backgroundColor = background;