Stop in for a cup of coffee

Maybe run a relay,ign on energizes relay and opens solar panel circuit. Or diodes?

I saw one that had diodes included in the circuitry for just that purpose.