Hydrogen is a key element in the energy transition. Hydrogen-metal systems have been studied for various energy-related applications, e.g., for their use in reversible hydrogen storage, catalysis, hydrogen sensing, and rechargeable batteries. These applications depend strongly on the thermodynamics of the metal-hydrogen system. Therefore, tailoring the thermodynamics of metal-hydrogen interactions is crucial for tuning the properties of metal hydrides. Here we present a case of large metal hydride destabilization by elastic strain. The addition of small amounts of zirconium to yttrium leads to a compression of the yttrium lattice, which is maintained during (de)hydrogenation cycles. As a result, the equilibrium hydrogen pressure of YH2 → YH3 can be rationally and precisely tuned up to five orders of magnitude at room temperature. This allows us to realize a hydrogen sensor which indicates the ambient hydrogen pressure over four orders of magnitude by an eye-visible color change.