Camera not updating

I am tring to set up some media player controls for spotify in my floorplan. I am running into an issue with the album image not updating unless I refresh the page or pause the song and start playing again.

Below is the code I am using in floorplan to display the image:

        - name: Camera Images
          entities:
            - entity: media_player.spotify
          camera_image_template: '${entity.attributes.entity_picture}'

I have also tried creating a camera template from the album image and using that in my floorplan, but that only updates when I refresh the page. The pause/play trick from above does not update this camera.

camera:
  - platform: generic
    name: Spotify Cover
    still_image_url: >
      {% if is_state("sensor.spotify_song", "Nothing Playing")%}
        {{ states.sensor.spotify_base_url.state }}/local/spotify_logo.png
      {% else %}
        {{ states.sensor.spotify_base_url.state }}{{ states.media_player.spotify.attributes.entity_picture }}
      {% endif %}

Any ideas would be appreciated.

1 Like