Wrong configuration

hi,

just started to implement BOSE soundtouch into my config but I still receive error while starting the server …
do anyone has idea what I have to change?

thx

homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 51.05
  longitude: 13.75
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 117
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Berlin

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  #api_password: 
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
sensor:
  platform: yr

# Text to speech
tts:
  platform: google
  

    
media_player:
  - platform: soundtouch
    host: 192.168.178.39
    port: 8090
    name: Soundtouch Living Room
  
  - platform: samsungtv
    host: 192.168.178.29
  - service: media_player.play_media
    data:
    entity_id: media_player.soundtouch_living_room
    media_content_id: 1..6
    media_content_type: PLAYLIST

Can you post your config so the formatting is maintained? It is very important for the config that the formatting is correct and it cannot be checked in what you posted above. See the following link for how to post your config and maintain formatting.

You should also post the error message from the log.
Have you read https://home-assistant.io/getting-started/troubleshooting-configuration/ ?

    homeassistant:
  # Name of the location where Home Assistant is running
  name: Home
  # Location required to calculate the time the sun rises and sets
  latitude: 51.05
  longitude: 13.75
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 117
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: Europe/Berlin

# Show links to resources in log and frontend
introduction:

# Enables the frontend
frontend:

http:
  # Uncomment this to add a password (recommended!)
  #api_password: 
  # Uncomment this if you are using SSL or running in Docker etc
  # base_url: example.duckdns.org:8123

# Checks for available updates
updater:

# Discover some devices automatically
discovery:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:

# Enables support for tracking state changes over time.
history:

# View all events in a logbook
logbook:

# Track the sun
sun:

# Weather Prediction
sensor:
  platform: yr

# Text to speech
tts:
  platform: google
  

    
media_player:
  - platform: soundtouch
    host: 192.168.178.39
    port: 8090
    name: Soundtouch Living Room
  
  - platform: samsungtv
    host: 192.168.178.29
  - service: media_player.play_media
    data:
    entity_id: media_player.soundtouch_living_room
    media_content_id: 1..6
    media_content_type: PLAYLIST

@NafriC u should also post the error message from the log. Have you read https://home-assistant.io/getting-started/troubleshooting-configuration/ ?

first of all … thx having me supported :wink:

this is my error that I get on the console

17-01-25 08:17:09 homeassistant.bootstrap: Invalid config for [media_player]: required key not provided @ data[‘platform’]. Got None. (See C:\Users\id\AppData\Roaming.homeassistant\configuration.yaml, line 53). Please check the docs at https://home-assistant.io/components/media_player/

I allmost have the same Problem. The Player´s are showing, but I´m not able to activate the presets.

media_player:

  • platform: soundtouch
    host: 192.168.178.21
    port: 8090
    name: Speisesaal
  • platform: soundtouch
    host: 192.168.178.20
    port: 8090
    name: Raum der Stille
  • service: media_player.play_media
    data:
    entity_id: media_player.speisesaal
    media_content_id: 1…6
    media_content_type: PLAYLIST

So the service must be wrong, but I can´t figure it out. Could someone help?

  - service: media_player.play_media
    data:
    entity_id: media_player.soundtouch_living_room
    media_content_id: 1..6
    media_content_type: PLAYLIST

This cannot go under media player, but underneath a script or automation. Therein lies your problem. Since you have it underneath a media player, the media player service expects you to put a required key ‘platform’ (as described in the log).

(There are also indentation errors.)

I also had this in mind, the documentation at https://home-assistant.io/components/media_player.soundtouch/ is actually misleading.

Thx I know what you mean. So I put the service line underneath an automation

automation:
alias: Play Music
service: media_player.play_media
data:
entity_id: media_player.speisesaal
media_content_id: 1…6
media_content_type: PLAYLIST

still not working. :frowning: I also tried this:
scipt:
service: media_player.play_media
data:
entity_id: media_player.speisesaal
media_content_id: 1…6
media_content_type: PLAYLIST

Stop trying, start reading https://home-assistant.io/getting-started/automation/ .

But before you start with automation, you should focus on integrating your media_player device. Remove the automation part (or uncomment it for later use) and check if HA is starting with just the media_player definition. If it does, it should already offer some basic operations in it’s web-interface for the device.

Ok. My Bose is showing and playing in Home assistant, but I can´t switch the presets. That´s my Problem. But thank you,

I have no soundtouch, so what I am proposing is just a hint, probably not a working configuration. Be sure to backup your current configuration before you start to edit.

In configuration.yaml

input_slider:
  bose_preset:
    name: Select Preset
    min: 1
    max: 6
    step: 1

automation:
  - alias: Change Preset
    trigger:
      platform: state
      entity_id: input_slider.bose_preset
    action:
      - service: media_player.play_media
        data_template:
          #
          # use matching entity_id here
          #
          entity_id: media_player.speisesaal
          media_content_id: "{{ states('input_sider.bose_preset') }}"
          media_content_type: PLAYLIST

So könnte es funktionieren.

Regards

m0wlheld

1 Like

Thank you. I will try this and let you know.

Hi
I’ve the same problem with my Bose Soundtouch. If I simply define the media player it works, but when I try to define the service to PLAY a preset the server doesn’t restart cause an invalid format of the file configuration.yaml. The strange thing is that one time I’ve defined the service with nano editor and only reloaded the configuration file through the button on the frontend, in that case the service worked. Can anyone help me? Thanks