Thermal switching in semiconducting glasses