Switching a running motor from one AC source to another is an invitation to disaster. Switching a transformer-powered electronic device from one AC source to another, while live, can create damaging transients. Etc.
You either turn power off from the grid and on from the inverter, use a UPS-style system, or use a grid-tie capable inverter.
UPS-style systems are designed mainly around keeping some important grid-powered load alive during outages. They're built on the assumption that the load is important enough that it's worth paying extra for electricity to keep it alive. So they tend to be pretty inefficient. That means they're a poor match for a mixed line-RE system: They're likely to burn all your precious RE power with their inefficiency, or at least force you to buy extra panels or whatever, at big bux.
Grid-tie capability in an RE inverter adds a considerable cost (even if it doesn't have a "sell" feature - and at least a couple grand or so with the latter).
So you'll probably want to do the "turn it off, wait five seconds for the motors to stop, turn it on the other way" dance.