Enough solar energy later to charge battery?

Figuring it out is the best part of it. I had my solar panels and battery installed in January. Just now nearly 8 months later I am happy with my setup.
I am using average forecast based on Solcast and Forecast.Solar -20%. That gives me a conservative figure that in 99% of all days is achievable. Then I have a couple of SQL sensors looking at my past energy usage and that data is used by another sensor to decide if and how much energy should be exported in the evening and how much energy should be imported from the grid overnight.
But if you are looking for a ready solution and if you happen to use certain make of inverter and battery take a look at GitHub - springfall2008/batpred: Home battery prediction and charging automation for Home Assistant with GivTCP