Automate Bluetooth Audio Connection

Hi. My standard audio device is an AVR HDMI and when I want to change to my (already previously connected BT AirPods) I have to go to Settings-System-Audio and change the Audio Device to Bluetooth Audio() and to switch off Passthrough, and additionally after starting the video, change in Video-Audio-Passthrough to off. Question: Is there a way to do these changes automatically when my AirPods connect and change back when I return the AirPods to the case and connection ended?

This won’t do the “automatically on connect/disconnect” part, but you can use it to setup audio profiles you can swap with a hotkey (that could also be mapped to a remote button).

Thank you. I will try.