Solar is not 0g CO2e.
https://www.sciencedirect.com/science/article/abs/pii/S00489...
says it's 14-73g CO2e. Home solar systems are probably less efficient so it could be even more. Do you have a battery to store the solar as well? You should account for the CO2 from its manufacture and losses from charge/discharge, too. This paper
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8654984/
says that solar+battery produces higher emissions than solar+power from grid