The macroscopic control of ubiquitous heat flow remains poorly explored due to the lack of a fundamental theoretical method. Here, by establishing temperature-dependent transformation thermotics for treating materials whose conductivity depends on temperature, we show analytical and simulation evidence for switchable thermal cloaking and a macroscopic thermal diode based on the cloaking. The latter allows heat flow in one direction but prohibits the flow in the opposite direction, which is also confirmed by our experiments. Our results suggest that the temperature-dependent transformation thermotics could be a fundamental theoretical method for achieving macroscopic heat rectification, and provide guidance both for macroscopic control of heat flow and for the design of the counterparts of switchable thermal cloaks or macroscopic thermal diodes in other fields like seismology, acoustics, electromagnetics, or matter waves.