  We investigate the effects of temperature on the higher-order topological
insulators (HOTIs). The finite-temperature topological invariants for the HOTIs
can be constructed by generalizing the Resta's polarization for the ground
state to the ensemble geometric phase (EGP) for the mixed states, [C.-E.
Bardyn, L. Wawer, A. Altland, M. Fleischhauer, and S. Diehl,
PhysRevX.8.011035}{Phys. Rev. X 8, 011035 (2018)}]. The EGP is consistent with
the Resta's polarization both at zero temperature and at finite temperatures in
the thermodynamic limit. {We find that the temperature can change the critical
point and thus induces a phase transition from a topologically-trivial phase to
a nontrivial phase in a finite-size system, manifesting changes in the winding
of the EGP.
