It seems unlikely your inverter will be in phase with the mains - the best you can hope for is the change over time of a relay, but then if you are switching, say, just at the conclusion of a pos half cycle of the mains and you happen to switch to a pos half cycle of the inverter - your down stream equipment has to be able to handle this - i.e. can't be a transformer ( as they don't handle 20mS of the same polarity very well ) ...
better to have the mains go thru a charger to the 24V battery - then, assuming the inverter is 100% reliable - you will have seamless power,
if you can synch the inv to the mains - you still have to decide what tolerance away from "good" mains - and for how long - before you let the relay change over - so you can not get "seamless" changeover - you have detect time & changeover time ...