While connecting to an access point, the access point sends the ESP8266 an “AKM suite count ... It’s even percolated downstream into the Arduino-for-ESP, where it’s just been worked ...
You have an ESP8266 board like the Wemos D1 ... learn a few tricks for doing sleep Arduino environment, and even calculate how long your specific battery could last. You’ll need a TP4056 ...