Automation of Bluesound Mediaplayer

I do apologise for newbie Question, new to both yaml and codeing but i have realy been trying to figure out how to integreate my Bluesound devices in my automations. my first step is to have my Bluesound Kitchen device to start playing in the morning , a specific local swedish channel . Here is my Automation so far , any help is greatly apreciated

  • alias: “Morgon Radio”

    trigger:

    • platform: time
      at: ‘06:30’

    action:

    • service: media_player.play_media
      data:
      entity_id: media_player.kitchen
      media_content_id: P4 Stockholm 103.3 (Lugna favoriter)
      media_content_type: music

I never had any luck with the play_media service. The solution I use is to add the radio station (or a playlist) as preset in the BluOS Controller. The presets then become sources in the HA media_player entity and can be selected with media_player.select_source. The player starts playing the selected source immediately.

In your case you would add the radio station as preset named e.g. “P4” in the BluOS Controller and then use the following action to select and play the preset:

action:
  - service: media_player.select_source
    data:
      entity_id: media_player.kitchen
      source: P4
1 Like

Thanx I try that

Thanks, this worked for me.

This works Great!
Thanx for answering my first Post