Comment by mgiampapa
If you have time based billing you can also input that into the system and it's even more effective. For example, if you tell it that electricity is cheap from 9am - 5pm (peak solar) and expensive from 5pm - 9pm (peak residential demand) it will take your trending consumption and decide when your solar production isn't keeping up with foretasted demand and let you charge from the grid to at the cheap rate to make up the shortfall and minimize cost. It even factors in things like grid charging speed and total site usage limits, which are great given my 100amp panel.
The charging the battery from the grid on its own is interesting in spaces where the TOU between 4-7pm (or whatever yours is locally).
Here it is more than 3x, so if I can charge a battery and run off of that for those 3 hours, I am saving money.
And it's not that I can lose money, a charge in the battery doesn't become stale.