home-assistant.io
home-assistant.io copied to clipboard
"Now Playing"
Feedback
Is there a way of extracting the track/artist metadate in a text form so that I'm able to send to an WS LED Matrix? Current automation that displays only "Playing", "Paused", "Idle" etc. shown below to show the use case.
`alias: Linn Media Player description: "" trigger:
- platform: state
entity_id:
- media_player.openhome_uuid_4c494e4e_0026_0f21_c4be_01311712013f
- media_player.linn_dining_room_upnp_av not_to:
- unknown
- unavailable condition: [] action:
- service: rest_command.wled_text metadata: {} data: text: >- {{states['media_player.openhome_uuid_4c494e4e_0026_0f21_c4be_01311712013f'].state}} #{{states['media_title.openhome_uuid_4c494e4e_0026_0f21_c4be_01311712013f'].string}} mode: single`
URL
https://www.home-assistant.io/integrations/openhome/
Version
2024.5.4
Additional information
No response
Hey there @bazwilliams, mind taking a look at this feedback as it has been labeled with an integration (openhome) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of openhome can trigger bot actions by commenting:
@home-assistant closeCloses the feedback.@home-assistant rename Awesome new titleRenames the feedback.@home-assistant reopenReopen the feedback.@home-assistant unassign openhomeRemoves the current integration label and assignees on the feedback, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information) to the feedback.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information) on the feedback.
Hi, you should be able to extract the artist and title from the media player attributes. For example:
{{ state_attr('media_player.openhome_uuid_4c494e4e_0026_0f21_e768_01357060013f', 'media_title' ) }}
{{ state_attr('media_player.openhome_uuid_4c494e4e_0026_0f21_e768_01357060013f', 'media_artist' ) }}
Many thanks Baz, I'll have a go with that.
Baz, Susssed it - a typo in my yaml! Many thanks!