Mini-media-player: Cover Artwork is reloading every few seconds

Created on 31 Mar 2019  路  2Comments  路  Source: kalkih/mini-media-player

I have the issue that the cover art reloads every few seconds or when pressing a button in the UI. This happens in Safari as well as Chrome.

Image

Here is my lovelace configuration for that card:

entities:
  - artwork: cover
    entity: media_player.bad
    group: true
    hide: null
    power: true
    short_info: false
    show_progress: true
    type: 'custom:mini-media-player'
  - artwork: cover
    entity: media_player.terrasse
    group: true
    hide: null
    power: true
    short_info: false
    show_progress: true
    type: 'custom:mini-media-player'
show_empty: false
state_filter:
  - playing
  - paused
type: entity-filter
question

Most helpful comment

Hi, this is caused by the entity-filter card which seems to destroy and recreate the card on each state/attribute change in the entities, and it does this to any card you place inside it, so it's nothing specific to just this card.

Although you'll notice it quite a bit in this particular case since this card does some of its initial logic while it's rendering for the first time, such as checking available width and adjusting the layout accordingly, and fetch the thumbnail/artwork from the HA backend.

Not sure why the entity-filter work this way tbh, it is extremely inefficient, at least when used with entities that change attributes/state a lot.

I would recommend using Conditional cards instead, I think there are some custom cards available that also does this sort of thing.

All 2 comments

Hi, this is caused by the entity-filter card which seems to destroy and recreate the card on each state/attribute change in the entities, and it does this to any card you place inside it, so it's nothing specific to just this card.

Although you'll notice it quite a bit in this particular case since this card does some of its initial logic while it's rendering for the first time, such as checking available width and adjusting the layout accordingly, and fetch the thumbnail/artwork from the HA backend.

Not sure why the entity-filter work this way tbh, it is extremely inefficient, at least when used with entities that change attributes/state a lot.

I would recommend using Conditional cards instead, I think there are some custom cards available that also does this sort of thing.

Btw, show_progress, short_info & power are no longer valid options, you can keep them in the config, it doesn't really matter but they have no effect.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rpitera picture rpitera  路  3Comments

bramkragten picture bramkragten  路  4Comments

porebas picture porebas  路  5Comments

davanda picture davanda  路  3Comments

nibblerrick picture nibblerrick  路  5Comments