  Photochromic oxygen$-$containing yttrium$-$hydride thin films are synthesized
by argon$-$magnetron sputtering on microscope slides. Some of them are
encapsulated with a thin, transparent and non$-$photochromic diffusion-barrier
layer of either Al2O3 or Si3N4. Ion beam-based methods prove that these
protective diffusion barriers are stable and free from pinholes, with
thicknesses of only a few tens of nanometers. Optical spectrophotometry reveals
that the photochromic response and relaxation time for both $-$ protected and
unprotected $-$ samples are almost identical. Ageing effects in the unprotected
films lead to degradation of the photochromic performance (self$-$delamination)
while the photochromic response for the encapsulated films is stable. Our
results show that the environment does not play a decisive role for the
photochromic process and encapsulation of oxygen containing rare-earth hydride
films with transparent and non-organic thin diffusion barrier layers provides
long-time stability of the films, mandatory for applications as photochromic
coatings on e.g., smart windows.
