Looks good, nice to see and learn the different approaches to “surplus charging”.
This flow has a lot of similarities with the one I created.
I see you are using a “momentum” for charging. If that makes it too “jumpy” you can consider to “average” the measurements (you can check my post to see how). I have some devices (quooker) that cause short high peaks that I do not want to respond to…
Depending on the amount of panels you have you might need to add switching between 1 and 3 phase