Is there any way to create a widget that shows my Bluetooth headphones battery %?

I have tried and tried to figure this out but can't seem to piece anything together. Any help would be much appreciated!

Yes of course! I don't Know exactly, but Aquatouch and GoldenChaos both have a widget like that.