Deep Sleep with HA sun sensor?

I’m trying to economize power with a ESP32-Cam setup.
It’s running on my roof, powered by solar and a 2500mah battery.

I’m trying not to drain the battery down over-night, especially since during the winter months I’m not sure if it’ll be getting a full charge.

Anyhow, has anyone ever seen an esphome config for deep sleep that can wake up every X minutes at night (to take a photo) and then disable sleep during the day? I’m guessing it could be based on the sun sensor in HA.

Also, I notice that the LED flash seems to be automatic in dark scenes. Is there a config to turn it off that isn’t published on the wiki?

Thanks