Code & explanation: how to add 'light-sleep' mode to an ESP32 project
NOTE! This is -not- code that is to be used alone.
But rather, as indicated in the comments, place each section at the appropriate place in YOUR code to allow your ESP32 device to go into 'light-sleep' mode to reduce power consumption and prolong battery life!