I believe the approach is to shut down all nonessentials and run a heater to keep the battery above failure level during the night. This sounds simple but I'm pretty sure it's an absolute nightmare to design autonomous systems for, especially when you've only encountered those situations theoretically or in a controlled lab environment.
Space is hard. It hates us. It hates life. It hates any form of order and will actively attempt to destroy it. Trying to make things that survive in space is Difficult. It would have been easy to go "Lol india amirite", but the fact is, this is one of the hardest things humanity can do.