Extended Thomas-Fermi theory at finite temperature