The air/ground sensing and number of batteries fitted plays no part in the switching of the Standby Power system.
At least in the 737NG airplanes I associate with....
As regards the number of batteries fitted, the primary battery supports all loads until Standby Power is initiated, then, and only then, the secondary battery is connected to effectively double the capacity of the standby system.
The secondary battery plays no part, other than being charged, until standby power is initiated.
And even then, if an APU start is initiated with standby power on, the two batteries with disconnect from each other for the duration of the APU starter cycle.
The system is determined to keep the secondary battery fully charged until it is switched into the system as it is designed!
Cheers...