Okay, so this is kind of a stupid question but I tried to understand it myself and I just got even more confused. I am using the Spotipy library to play music (controlled by my raspberry pi) on my computer using the specific device id. Now I want to implement the same thing but be able to play  directly on my Raspberry Pi. I have found something called Raspotify, which allows me to use my rpi as a spotify connect speaker. I wasn't able to find it in the devices list though, and I'm now wondering if it is even possible to control a connect speaker?
If not, are there any other ways to play music using the spotipy api on my rpi? Help is greatly appreciated, I tried figuring it out by myself but I just got even more confused.
I now found the answer myself. You can control Spotify Connect speakers using Spotipy, but for me the Spotify API had some trouble finding the device. It then just started working even though I didn't change anything. So for anyone else wondering, a spotify connect speaker acts like a normal device with device id and everything :)
Is a Spotify Connect Speaker able to be controlled by Spotipy?