That's how it does work now, at least in Australia, the energy meter on your house is connected to the internet and when the market rate goes negative (oversupply) solar production gets disconnected.
If you've got a battery you can continue to charge it, as well as consuming power from your own panels, but you won't feed back power at these times.