I am currently thinking about creating a "box" with a wall outlet, solar input and mains source input. This device will use a solar panel to charge an internal lead-acid battery. It's basically: Off-grid-in-a-box-with-backup-power-from-mains. There's an inverter hooked up to this battery. For the sake of this question, said inverter could be a square-wave ("modified sine wave") output or an actual sine wave generator, depending on the budget. This inverter will be wired - trough a DPDT relay - to the box' wall outlet where it will power household appliances (laptop, tv, phone charger, etc). When a microcontroller recognises that the battery is about empty, it will switch mentioned DPDT relais, so that the outlet on the box will be disconnected from the inverter, be floating for a minimal while and then be connected directly to the mains voltage that is supplied to the house by grid power. When the battery is above a certain charge treshold, the switch will be reverted so that the inverter is connected to the outlet again.
Obviously, the inverter AC output and grid power will NOT be in sync at all - and the relay could be switching over at any point in the AC cycle off the currently supplying source and then connect the AC source at any point of its AC cycle.
Would this unsynchronised switching induce any major side effects like damaging equipment that is connected to this "box" or perhaps damage equipment in the box itself like the inverter, for example due to surges, other things or magnetic fields that were still remaining in transformers in connected devices?