You need a home backup battery with a transfer switch, specifically one that accepts solar input. There are a bunch of off-the-shelf solutions out there.
In the US they cost a lot more, but they still exist; there's a 750-watt unit at Horror Fright for US$70: https://archive.fo/1pzdK