Today I went to check the battery status of my Airpods Max and found that ‘discover’ had been fully removed from Bleak. I had been getting warnings for years that it was deprecated and would eventually be axed. Today was the day. After updating Arch I was hit with discover being an unknown import from Bleak. I’ve tried every other trick in the book to get my Airpods battery to show on Linux, but Airstatus was the only one. I did some diving and saw that BleakScanner had replaced Discover.
I decided I might as well at some QoL things that I had wanted during my use of Airstatus. The new script accounts for Airpods Max and only shows a single battery level for them, as well as a keyboard interrupt exit script if you’re like me and just check your battery in the terminal from time to time.
This is my first github fork. I don’t know if I followed all the fork etiquette, but I did add delphiki in the readme markdown to credit them, as well as placed a notice at the end that it was a fork mostly for my own use. The only reason I decided to post it here is to help out anyone else that might be running into the same problem. Feel free to point out anything I should add to the readme or any problems with the script itself.
You can find my fork here: https://github.com/SleepyScribe/AirStatus
I will be spending a lot more time actually learning Python. I started learning a while back, but it had to be put on the backburner due to life in general. I’ll be completely transparent in that I needed some help from AI. I know the Python basics, and I’d love to be able to fix problems like these without having to consult AI at all, but I’m just not at the level to do this on my own yet. To be fair, I used it mostly as an assistant to check and troubleshoot each block and traceback error rather than having it spit the whole script out for me. That way I at least learned a bit. I did pull up the BleakScanner page, fullstack, and Python guides at first, but I was still struggling.