Thermostatically controlled master valves as heat controllers for buildings