Intermediate valence is one of the typical phenomena of systems with strong electronic correlation. The Anderson impurity model predicts a scaling of the valence with the reduced temperature T/T-K, which is difficult to observe by traditional surface-sensitive electronic spectroscopies. This paper presents results obtained by resonant inelastic X-ray scattering (RIXS), a bulk-sensitive configuration- and chemical-specific technique. The temperature dependence of the valence of YbInCu4 and YbAgCu4 was measured by tuning the incident energy to the resonance of the Yb2+ spectral component. In the case of YbInCu4 a sharp valence transition, as known from thermodynamical measurements, has been found. The valence of YbAgCu4 reveals a smooth dependence consistent with a Kondo temperature T-K = 70 K. These findings establish RIXS as a powerful tool for measuring bulk electronic properties of solids.