Radio browser automations

Is it possible to create an automation, using Radio Browser, to cast a specific radio station to a Chromecast device at a specific time ?

You can, here is mine. It starts a radio on Friday and Saturday. Created in the GUI

alias: 038. Radio 10 auto
description: Radio 10 op Vrijdagavond
trigger:
  - platform: time
    at: "21:00:00"
condition:
  - condition: or
    conditions:
      - condition: time
        weekday:
          - fri
      - condition: time
        weekday:
          - sat
action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.geluid_16
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - service: media_player.play_media
    target:
      entity_id: media_player.woonkamer
    data:
      media_content_id: media-source://radio_browser/d227990c-2385-4419-8159-1c73a33a58dd
      media_content_type: audio/mpeg
    metadata:
      title: Radio 10
      thumbnail: >-
        https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcScXQ3C4MdB2iKNRXVmQSy-fl3MBqAi-SX2JU3p-ZeLSiLCVbDw&s
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://radio_browser
        - media_content_type: music
          media_content_id: media-source://radio_browser/country/NL
  - service: media_player.volume_set
    metadata: {}
    data:
      volume_level: 0.22
    target:
      entity_id: media_player.woonkamer
mode: single

Many thanks (hartelijk van een Rotterdammer in de USA :slight_smile: ).
As I am not the king of Yaml, I have some problems understanding:

action:
  - service: switch.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: switch.geluid_16
  - delay:
      hours: 0
      minutes: 0
      seconds: 15
      milliseconds: 0
  - service: media_player.play_media
    target:
      entity_id: media_player.woonkamer
    data:
      media_content_id: media-source://radio_browser/d227990c-2385-4419-8159-1c73a33a58dd
      media_content_type: audio/mpeg
    metadata:
      title: Radio 10
      thumbnail: >-
        https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcScXQ3C4MdB2iKNRXVmQSy-fl3MBqAi-SX2JU3p-ZeLSiLCVbDw&s
      media_class: music
      children_media_class: null
      navigateIds:
        - {}
        - media_content_type: app
          media_content_id: media-source://radio_browser
        - media_content_type: music
          media_content_id: media-source://radio_browser/country/NL

Can this be achieved in Visual Editor ?
How do I find the data for let’s say Sky radio ?

Rooterdammert here too, in Rotterdam
Can’t seem to find how I did this, it was before the new editor. When u use my code you can then select different radio stations and country’s by clicking the mentioned one. This way I made 6 automations.
The switch used is to turn on the power of the player and not really needed

Eric

Thanks, I’ll try.
It is not urgent as current set-up (casting using play media with station’s url) works.

Okee,
I forgot to mention that when you create your automation with the step: media_player_play_media. Then go to the left top of your screen, three dots and switch to YAML mode. There you can paste the radio part from my code.

Rotterdam west

1 Like

Thanks so much to a fellow Rotterdammer :slight_smile: :netherlands: I was able to get it to work.