I've got two MBPs and a pair of bluetooth headphones that can only be connected to two devices at once.
I need to use this pair on both MBPs and my phone but only on one MBP at a time (usually, I can manually disconnect them from my phone in the rare event that I need to use them on both at the same time).
Additionally, the headphones are buggy/crappy and play an annoying ringing noise when they lose connection to a device AFAICT. I want to avoid this at all costs.
When I walk away from an MBP, I close its lid. I would then like it to automatically disconnect any bluetooth audio device its connected to.
I wouldn't mind having to connect to the headphones manually on the MBP I want to use them on but disconnecting manually is a no-go.
This thread is a duplicate but for an older macOS version (none of the solutions work in Big Sur).
I'm aware that you could toggle bluetooth off completely but that's the nuclear "solution".