A battery is not necessary at all. However, if you want to make the most of your renewable energy, a battery is recommended to give yourself independence from the power grid.