Vapor compression technologies widely used for refrigeration, heating, and air-conditioning have consumed a large fraction of global energy. Efforts have been made to improve the efficiency to save the energy, and to search for new refrigerants to take the place of the ones with high global warming potentials. The solid-state refrigeration using caloric materials are regarded as high-efficiency and environmentally friendly technologies. Among them, the elastocaloric refrigeration using shape memory alloys has been evaluated as the most promising one due to its low device cost and less of a demand for an ambient environment. General caloric materials heat up and cool down when external fields are applied and removed adiabatically (conventional caloric effect), while a few materials show opposite temperature changes (inverse caloric effect). Previously reported shape memory alloys have been found to show either a conventional or an inverse elastocaloric effect by the latent heat during uniaxial-stress-induced martensitic transformation. In this paper, we report a self-regulating functional material whose behavior exhibits an elastocaloric switching effect in Co-Cr-Al-Si Heusler-type shape memory alloys. For a fixed alloy composition, these alloys can change from conventional to inverse elastocaloric effects because of the change in ambient temperature. This unique behavior is caused by the sign reversal of latent heat from conventional to the re-entrant martensitic transformation. The realization of the elastocaloric switching effect can open new possibilities of system design for solid-state refrigeration and temperature sensors.