https://github.com/dtcooper/raspotify
Hard installation
Essentially, here’s what the easy installer does,
# Install curl and https apt transport
sudo apt-get -y install curl apt-transport-https
# Add repo and its GPG key
curl -sSL https://dtcooper.github.io/raspotify/key.asc | sudo apt-key add -v -
echo 'deb https://dtcooper.github.io/raspotify jessie main' | sudo tee /etc/apt/sources.list.d/raspotify.list
# Install package
sudo apt-get update
sudo apt-get -y install raspotify
https://www.home-assistant.io/components/media_player.spotify/