The following snippet can be used to enable experimental features for the bluetooth service which will in turn expose the bluetooth device battery status.
Run the following command to add the -E flag to the ExecStart line of bluetooth.service:
cp /usr/lib/systemd/system/bluetooth.service /etc/systemd/system/
sed -i -r 's/ExecStart=.+/& -E/' /etc/systemd/system/bluetooth.service
systemctl daemon-reload
systemctl restart bluetooth
To check the reported battery level, get the MAC address of the bluetooth device:
bluetoothctl devices
The dbus API can then be used to retrieve the battery level:
mac="04:52:C7:0D:65:64"
mac="${mac//:/_}"
dbus-send --print-reply=literal --system --dest=org.bluez /org/bluez/hci0/dev_${mac} org.freedesktop.DBus.Properties.Get string:"org.bluez.Battery1" string:"Percentage"
To revert the change, simply remove the override file that was created in the previous step:
rm -f /etc/systemd/system/bluetooth.service
systemctl daemon-reload
systemctl restart bluetooth