There was a project to try this:
https://www.greentechmedia.com/articles/read/german-utility-...
Unfortunatly this project was cancelled since Germany taxes electricity from batteries two times: Once when charging the battery and once when discharging it (since it is then seen as "producing" electricity).