Can anybody help me with how I can set the album art or image in the media player? I have added chrome cast to my home assistant and when I cast from spotify or a internet radio app its automatically shows the correct image or album art. However I have made an automation that send an internet address to the chrome cast and starts playing, in this case I do not get any image in the player. So how can I update the image?
This is how my automation looks now. I tried with setting the entity_picture but no sucess.
Just because it has an attribute does not mean it can be set in the configuration. The documents don’t spell it out. The media_player base class only contains the property and it cannot be set unless the component chooses to. The cast component only sets it from the URL provided:
@property
def media_image_url(self):
"""Image url of current playing media."""
if self.media_status is None:
return None
images = self.media_status.images
return images[0].url if images and images[0].url else None
Not without changing the component and adding a service. You’d need to make it into a custom component and override the built in component. Would be quite a bit of work.
I’m trying to solve the same problem, and using the node-red-contrib-cast node. It’s no problem to send an image when I start the stream, but is it possible to change the image, withour interupting the audio-stream?
I’m trying to mimic the behaviour of my radio-app in my phone where the image changes when a new program starts. And it changes the image in HA as well, but would like to be able to start it automatically from HA as well.
OK, then the images are also being streamed from the radio station. If the station is using fairly simple code you may just need to find their image URL. The easiest way is probably to just cast the station directly to your configured cast device then check the entity_picture attribute in HA. In the example above you can see that a token is required, but you might be luckier, or the token may match one provided in the media URL.
Did you had further developments ?
I’m having exactly the same issue. Radio streaming to google hub, and I would like to change the background every time the music changes.