Battery percentage when connecting or disconnecting a bluetooth device

I’m trying to get a log of my battery percentage of my Bluetooth speakers when I connect or disconnect them.

Any ideas? Has this been implemented already?