The new generation of hybrid solar inverters are connected directly to your solar panels.
They are inexpensive for what they do
Charge the batteries
Convert the 12/24v output from solar panels to 220v for domestic use
Automatically decide from where to source the electricity that you need
Mains power (if available).