home-assistant / home-assistant.io

:blue_book: Home Assistant User documentation
https://www.home-assistant.io
Other
4.86k stars 7.23k forks source link

Radio Browser: Missing a step to get media_content_id for use in automation #32825

Closed donburch888 closed 2 days ago

donburch888 commented 4 months ago

Feedback

If I go to Media Sources > Radio Browser and select the Australian ABC Classics channel it starts playing image

The URL is: http://192.168.1.98:8123/media-browser/browser/app%2Cmedia-source%3A%2F%2Fradio_browser/music%2Cmedia-source%3A%2F%2Fradio_browser%2Fcountry%2FAU

How to get the required value for media_content_id: in the format used in the automation example ?

URL

https://www.home-assistant.io/integrations/radio_browser/

Version

2024.5.3

Additional information

My guess is that you are using additional component (eg Music Assistant) or website.

home-assistant[bot] commented 4 months ago

Hey there @frenck, mind taking a look at this feedback as it has been labeled with an integration (radio_browser) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `radio_browser` can trigger bot actions by commenting: - `@home-assistant close` Closes the feedback. - `@home-assistant rename Awesome new title` Renames the feedback. - `@home-assistant reopen` Reopen the feedback. - `@home-assistant unassign radio_browser` Removes the current integration label and assignees on the feedback, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information) to the feedback. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information) on the feedback.
github-actions[bot] commented 2 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved. If this issue is still relevant, please let us know by leaving a comment 👍 This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

donburch888 commented 2 months ago

Today I went to Radio_browser integration page. It still says

When creating an automation, use the Play Media action to pick a station from the directory.

I guess this hint gives a clue to experienced HA developers - but is far too subtle for new non-developers. It certainly implies that it only works for creating automations for Cast devices.

I understand now that this means ...

  1. going to Settings > Automations & Scenes > create automation > Create new automation.

  2. In the New Automation page, under the "then Do" section, click [+ Add Action] .

  3. On the Add action pop-up, select "media Player", then the first "Play media" option - NOTE that there are 2 options both labelled "Play media" - you want the one with subtitle "Play media on media player"; and NOT the one with subtitle "Starts playing specified media". You should now see: image

  4. Select your media player, then pick the media (audio) file you wish to play (it uses the HA Media Sources pop-up, so you can select local files (in the /media/ folder in HAOS, or a NAS share configured on Settings > System > Storage as a Media usage), Radio Browser (if installed), an installed Text-to-speech provider, ... or I guess most anything installed in HA. It should now look like Screenshot from 2024-07-17 20-09-08

  5. Having selected the music to play, use the vertical 3-dots button to select the "Edit in YAML" option, and hey presto, there in the "data:" section is the media_content_id: that you can copy and paste into lovelace buttons, other automations, etc. There is also the title: and thumbnail: parameters. image


Note that the same media selector is not available in the Developer Tools, where I had expected it. image

github-actions[bot] commented 3 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved. If this issue is still relevant, please let us know by leaving a comment 👍 This issue has now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.