This is reality, att least in Sweden. You can invest in battery storage att your house and give control of it to the power company. They will then use the locally available power storage to either feed back to the grid or store excess of capacity and needed.
It can be quite profitable from what i heard, in relation to installing solar cells.