  We study the effects of temperature on the topological nature of ZrTe$_5$,
which sits near the phase boundary between strong and weak topological
insulating orders. Using first-principles calculations, we show that the band
gap and the topological indices of ZrTe$_5$ are extremely sensitive to thermal
expansion, and that the electron-phonon interaction accounts for more than a
third of the total temperature-dependent effects in ZrTe$_5$. We find that the
temperature dependence of the band gap has an opposite sign in the strong and
weak topological insulator phases. Based on this insight, we propose a robust
and unambiguous method to determine the topological nature of any given sample
of ZrTe$_5$: if the band gap decreases with temperature it is a strong
topological insulator, and if it increases with temperature it is a weak
topological insulator. An analogous strategy is expected to be generally
applicable to other materials and to become particularly important in the
vicinity of topological phase boundaries where other methods provide ambiguous
results.
