Grid-connected photovoltaic (PV) power systems are one of the most promising technologies to address growing energy demand and ecological challenges. This paper proposes smart switching to mitigate inrush currents during the connection of single-phase transformers used in PV systems. An effective inrush current mitigation contributes to the reliability of PV systems. The inrush current severity is influenced by the pseudorandom residual flux at the transformer core and the energization point-on-wave. The most common approach to avoid inrush currents is controlled connection, which requires prior knowledge of the residual flux. However, the residual flux can differ in each case, and its measurement or estimation can be impractical. The proposed smart switching is based on a comprehensive analysis of the residual flux and the de-energization trajectories, and only requires two pieces of data (ϕRM and ϕ0, flux values of the static and dynamic loops when the respective currents are null), calculated from two simple no-load tests. It has a clear advantage over common approaches: no need to estimate or measure the residual flux before each connection, avoiding the need for expensive equipment or complex setups. Smart switching can be easily implemented in practical settings, as it considers different circuit breakers with distinctive aperture features, making it cost-effective for PV systems.