I just need the battery level percentage at one point to print it on the screen, but I don't want to keep monitoring it afterwards.
All code on the internet seems to listen for future changes, but I just need it once. What can be done to get it in a simple way?