Maybe just a myself-reminder. but I have saved a gist with the udev rules needed for letting my LE box to autoswitch the output audio device on bluetooth connected device.
The outcome is:
BT connected -> pulse active (A2DP output)
BT disconnected -> alsa active (HDMI output)
Feel free to comment or suggest improvements.