if you go to the developer tools and search for the media_player you created with my custom component this entity should have some attributes. Example for a chromecast media_player:
Hi @Sennevds, I’m looking to test out your component but having some issues installing it. Are your installation instructions still accurate? I still need to copy all the files from https://github.com/home-assistant/core/tree/dev/homeassistant/components/template into \custom_components\template directory?
I saw there is a manifest.json and __init__.py file in your repo. Should that replace the files in the \template\ directory?
Also, is there any way to set other attributes like entity_picture? I’m hoping to use your template player to show the cover art from the Steam game I’m currently playing.
you need to place the files in the following folder: {configfolder}/custom_components/media_player_template
Entity picture isn’t possible at this moment. Maybe if I have time this week I will integrate it
I’ve updated the repo. Artist and album works(but you need to set the media_content_type_template to music)
Entity_picture is set by using media_image_url_template
Thanks for adding the feature! I defined the media_image_url_template for my Steam media player and the game image shows up. I tried adding the template media player with Universal media player , but it seems to have some problems pulling the entity picture. I think it’s a problem with Universal media player component, not with your component.
Do you know why template media player’s attribute is called entity_picture_local instead of entity_picture? That might be the reason why the entity picture is not picked up by the Universal media player.
Your template media player looks like this in my dashboard:
I use the mini-media-player custom lovelace card to display my media players. I’m also using the Steam component and setup some templates in your component to show the state, title, and entity picture.
I will check your config tomorrow. I’ve created a pull request to add it to hacs but it hasn’t been merged. Did you download the latest version from github?
Edit:
I’ve just tested it myself and if I add media_content_type_template: "music" it works like expected
I copied the media_player_template folder inside my custom_components
and reboot.
Now I see this error message:
Invalid config
The following integrations and platforms could not be set up:
* template
* media_player_template.media_player
Please check your config and logs).