Radio stations on HADashboard

Hello guys

I do have Jukebox card on Lovelace and that works great :

type: vertical-stack
cards:
  - type: media-control
    entity: media_player.mpd
  - title: Stacje radiowe
    type: 'custom:jukebox-card'
    links:
      - url: 'https://rs9-krk2-cyfronet.rmfstream.pl/RMFFM48'
        name: RMF FM
      - url: 'https://n-6-12.dcs.redcdn.pl/sc/o2/Eurozet/live/audio.livx'
        name: Radio Zet
      - url: 'https://rs7-krk2-cyfronet.rmfstream.pl/RMFMAXXX48'
        name: RMF MAXXX
      - url: 'https://ext03.ic.smcdn.pl/t064-1.mp3'
        name: Radio Eska
      - url: 'https://an03.cdn.eurozet.pl/ant-waw.mp3'
        name: AntyRadio
      - url: 'https://ext03.ic.smcdn.pl/t041-1.aac'
        name: Eska Rock
      - url: 'https://stream.radiokampus.fm/kampus'
        name: Kampus
      - url: >-
          https://rs102-krk-cyfronet.rmfstream.pl/CLUB?listenerid=e50347af63e4de68435ee44cbb98917f&awparams=companionAds%3Atrue&aw_0_1st.version=1.1.4%3Ahtml5&aw_0_1st.playerid=RMF_Player_JS_P&aw_0_1st.skey=1605644358&aw_0_req.gdpr=true&aw_0_1st.playerid=RMF_Player_JS_P
        name: RMF Club
    entities:
      - media_player.mpd
    attribute: media_title

What I did as well is the Automation which changing source on my Soundbar when mediaplayer starts which looks following:

alias: Analog
description: ''
trigger:
  - platform: state
    entity_id: media_player.mpd
    from: paused
    to: playing
condition: []
action:
  - service: media_player.select_source
    data:
      entity_id: media_player.ht_zf9
      source: Analog
    entity_id: media_player.ht_zf9
  - service: media_player.turn_on
    data: {}
    entity_id: media_player.ht_zf9
mode: single

I wanted to do all Radio stations under HADashboard so i created that yaml file:

scene_rmf:
    widget_type: switch
    title: RMF FM
    entity: media_player.mpd
    links:
      - url: 'https://rs9-krk2-cyfronet.rmfstream.pl/RMFFM48'
    icon_on: mdi-music
    icon_off: mdi-music

scene_radiozet:
    widget_type: switch
    title: Radio Zet
    entity: media_player.mpd
    links:
      - url: 'https://n-6-12.dcs.redcdn.pl/sc/o2/Eurozet/live/audio.livx'
    icon_on: mdi-music
    icon_off: mdi-music

scene_rmfmaxxx:
    widget_type: switch
    title: RMF MAXXX
    entity: media_player.mpd
    links:
      - url: 'https://rs7-krk2-cyfronet.rmfstream.pl/RMFMAXXX48'
    icon_on: mdi-music
    icon_off: mdi-music

scene_eska:
    widget_type: switch
    title: Radio ESKA
    entity: media_player.mpd
    links:
      - url: 'https://ext03.ic.smcdn.pl/t064-1.mp3'
    icon_on: mdi-music
    icon_off: mdi-music

scene_anty:
    widget_type: switch
    title: Antyradio
    entity: media_player.mpd
    links:
      - url: 'https://an03.cdn.eurozet.pl/ant-waw.mp3'
    icon_on: mdi-music
    icon_off: mdi-music

scene_esrock:
    widget_type: switch
    title: ESKA Rock
    entity: media_player.mpd
    links:
      - url: 'https://ext03.ic.smcdn.pl/t041-1.aac'
    icon_on: mdi-music
    icon_off: mdi-music

scene_kampus:
    widget_type: switch
    title: Kampus
    entity: media_player.mpd
    links:
      - url: 'https://stream.radiokampus.fm/kampus'
    icon_on: mdi-music
    icon_off: mdi-music

scene_clock:
    widget_type: clock
    time_format: 24hr
    date_format_country: pl-PL
    date_format_options:
      weekday: short
      day: numeric
      month: numeric
    show_seconds: 1 

scene_club:
    widget_type: switch
    title: RMF Club
    entity: media_player.mpd
    links:
      - url: 'https://rs102-krk-cyfronet.rmfstream.pl/CLUB?listenerid=e50347af63e4de68435ee44cbb98917f&awparams=companionAds%3Atrue&aw_0_1st.version=1.1.4%3Ahtml5&aw_0_1st.playerid=RMF_Player_JS_P&aw_0_1st.skey=1605644358&aw_0_req.gdpr=true&aw_0_1st.playerid=RMF_Player_JS_P'
    icon_on: mdi-music
    icon_off: mdi-music

layout:
    - scene_clock(8x1)
    - scene_rmf, scene_radiozet, scene_rmfmaxxx, scene_eska, scene_anty, scene_esrock, scene_kampus, scene_club

Problem is that no matter which radio I will click on HADashboard nothing changes, it plays only radio chosen within Jukebox card on Lovelace…

I hope I made that clear …

What I’m doing wrong ? Thank you for all your help

OK, managed to do it bit different way based on that:
https://www.home-assistant.io/cookbook/perform_actions_based_on_input_select/
All works fine now !

I am absolute beginners, I want to stream radio channels to the google home speaker. Would you submit a workable solution?

Do you have Google speaker integrated into HA as Media player ?

Yes, i have a Google Home Speaker, that works fine

Is it integrated with Home Assistant ?

Of course. I hear it switch to the speaker but nothing happens after that.

On lovelace use Jukeboxcard use your Google Home speaker media player entity

title: Radio stations 
type: custom:jukebox-card
links:
  - url: https://rs9-krk2-cyfronet.rmfstream.pl/RMFFM48
    name: RMF FM
  - url: https://n-6-12.dcs.redcdn.pl/sc/o2/Eurozet/live/audio.livx
    name: Radio Zet
  - url: https://rs7-krk2-cyfronet.rmfstream.pl/RMFMAXXX48
    name: RMF MAXXX
  - url: https://ext03.ic.smcdn.pl/t064-1.mp3
    name: Radio Eska
  - url: https://an03.cdn.eurozet.pl/ant-waw.mp3
    name: AntyRadio
  - url: https://ext03.ic.smcdn.pl/t041-1.aac
    name: Eska Rock
  - url: https://stream.radiokampus.fm/kampus
    name: Kampus
  - url: >-
      https://rs102-krk-cyfronet.rmfstream.pl/CLUB?listenerid=e50347af63e4de68435ee44cbb98917f&awparams=companionAds%3Atrue&aw_0_1st.version=1.1.4%3Ahtml5&aw_0_1st.playerid=RMF_Player_JS_P&aw_0_1st.skey=1605644358&aw_0_req.gdpr=true&aw_0_1st.playerid=RMF_Player_JS_P
    name: RMF Club
  - url: http://streamer2.clubbingstation.com/Clubbing-Station-US-mp3
    name: Clubbing
  - url: https://stream.open.fm/31
    name: OpenFM Dance
  - url: https://stream.open.fm/114
    name: OpenFM Club
entities:
  - media_player.XXXXXX

That is input select if u need it :

input_select:
    odtworz_radio:
    name: Choose radio
    icon: mdi:radio
    options:
      - Choose
      - RMF FM
      - Radio Zet
      - RMF Maxxx
      - Radio Eska
      - Antyradio
      - ESKA Rock
      - Kampus
      - RMF Club
      - Clubbing
      - OpenFM Dance
      - OpenFM Club
    initial: 'Choose'

If above will not work for u – look for media_player.mpd integration

1 Like

on Lovelace I use another,
I want to use on HADashboard…

This is automation which I used to using for Hadashboard

alias: Antyradio
description: ''
trigger:
  - platform: state
    entity_id: input_select.odtworz_radio
    to: Antyradio
condition: []
action:
  - service: media_player.play_media
    data:
      media_content_id: |
        {% if is_state("input_select.odtworz_radio", "Antyradio") %}
          https://an03.cdn.eurozet.pl/ant-waw.mp3
        {% else %}
          Wybierz
        {% endif %}
      media_content_type: music
    entity_id: media_player.tv_w_salonie
mode: single

An I did button under HADashboard which trigger that automation

I’m sorry, but I’m really a complete beginner:

  1. Write this in the automations.yaml file (separate automation for each radio station)
  2. I’m making a button on the dashboard - what’s in it?

ScreenShot_20220121181153

input_select:
  odtworz_radio:
    name: Choose radio
    icon: mdi:radio
    options:
      - Choose
      - RMF FM

pasting issue :wink: but good catch !

Yes, you have to create new automation and paste it, regarding hadashboard button looks following :

scene_rmffm:
    widget_type: mode
    title: RMF FM
    entity: input_select.odtworz_radio
    icon_on: mdi-radio
    icon_off: mdi-radio
    mode: "RMF FM"
    post_service_active:
        service: input_select/select_option
        entity_id: input_select.odtworz_radio
        option: "RMF FM"
    post_service_inactive:
        service: input_select/select_option
        entity_id: input_select.odtworz_radio
        option: Wybierz

But I’m not sure if you know how to configure hadashboard … if not . .you have to go thorugh manual I’m afraid

I create a new automation:


I create this my hadashboard:
image
and i saw this on my dashboard:
image
What’s the mistake?

See posts above - create input_select in configuration.yaml