The local structure of ${\mathrm{YBa}}_{2}$${\mathrm{Cu}}_{3}$${\mathrm{O}}_{\mathrm{y}}$ determined using x-ray-absorption fine structure (XAFS) agrees well with the long-range order given by diffraction results for both oxygen-rich, orthorhombic (y=6.98 and 6.87) and oxygen-deficient, tetragonal (y=6.15) compounds. The x-ray-absorption near-edge structure supports the conclusion that, as y=7 goes to y=6, the O is removed from the chains and the chain Cu atoms, Cu(1), becomes monovalent with a linear O-Cu-O structural configuration and a 3${d}^{10}$ electronic configuration, as in ${\mathrm{Cu}}_{2}$O. For the XAFS analysis, structural standards were determined, and these standards worked well not only for the Cu first-neighbor O environment but also for the Cu second-neighbor metal-atom environment out to 4 A\r{}. A detailed multipeak analysis reproduced the XAFS spectra well and yielded structural parameters that agree with diffraction. The temperature dependence of the structural parameters shows only a smooth variation, with no significant anomalies. The Cu-X distances have a negligible to a small positive change with temperature, consistent with the lattice expansion. The exception is the Cu-Ba distances which change substantially; the Cu(1)-Ba distance increases and the Cu(2)-Ba distance decreases. This indicates that the Ba moves away from the Cu(1)-O chains and toward the Cu(2)-O planes with increasing temperature and that anharmonicity plays a role. This motion is larger for the oxygen-depleted compound than for the fully oxygenated material. The in-plane Cu-O first-neighbor vibrations exhibit no significant softening with temperature. They agree well with a harmonic, Einstein oscillator model which shows that the Cu-O bonds are tightly bound (characteristic Einstein temperatures ${\mathrm{FTHETA}}_{E}$=596\ifmmode\pm\else\textpm\fi{}20 K) and are slightly softer by 6% in the oxygen-deficient, tetragonal material.