Spotify Setup Issues

I believe I have everything setup correct with with my Spotify integrate but I am still getting config errors. Can anyone see something that I am doing wrong? Everything else in configuration.yaml works just fine

Link to screenshots

Clicking the link in the error message just brings me to this page https://www.home-assistant.io/integrations/spotify/

It seems like your YAML indentation is off, notice in the second screenshot there’s a bunch of spaces under the spotify: line? There should only be two spaces before client_id: and client_secret: like this:

spotify:
  client_id: !secret spotify_id
  client_secret: !secret spotify_secret

Also you can usually find out what’s wrong by going to “Developer Tools” in the sidebar and then on that page click the “Logs” tab at the top. There should be something about Spotify in the logs that would give you more information.

It’s the same indentation as my other items and they work fine so I don’t think it’s that but I’ll try changing it tomorrow.

This is what was in the log

Setup failed for spotify: No setup function defined.

Figured it out with the help of @dwinnn and @plonka2000.

I finally got this to work, by setting in configuration.yaml

media_player: !include_dir_merge_list media_player

then creating a folder media_player and in this folder the file spotify.yaml .
within spotify.yaml :

Copy to clipboard

- platform: spotify
  client_id: !secret spotify_client_id
  client_secret: !secret spotify_client_secret

And now it works.

secrets for spotify_client_id and spotify_client_secret in my secrets.yaml :

Copy to clipboard

spotify_client_id: 324f2f23r32r312r23r23r23r2r22f23
spotify_client_secret: 23r32r23r23rf23tr23r23r2r23r23rf32r

I’m really not sure what changed from having it directly in the main configuration.yaml