Conditions for thermal switching in sandwich devices