I'm not sure you can control things to this extent: you want both solar and battery to output power, and you want the house and the grid to receive power, but you can't dictate which power source is routed to which power sink. (Indeed if it's a hybrid inverter, all the AC is coming out of one port anyway, with the two DC sources mixed together.)
Not sure why battery discharge to the grid is "wasted", but solar exported to the grid isn't.
You could possibly do it over an extended period if you can set the battery charge limit to 0, so that it is allowed to discharge, but not charge. If that's possible, it might discharge when the house load is higher than the PV generation (including overnight), but shouldn't accept any new charge when there is excess solar. Might take a while to discharge the batteries this way, though.