If you think body temperature is the only parameter controlling the sweating process, think again. Actually, you are right in terms of it being the principle mechanism involved in dictating whether the body will sweat. A thermoregulating center within the brain senses our body temperature and when it begins to rise, signals are fired out to the eccrine sweat glands via our nervous system. Our sweat glands then begin to pump out sweat to maintain a temperature that will keep our vital organs from overheating.
Sensors that feel our blood pressure (called "baroreceptors"; from the word 'baros', greek for weight; similar to barometer), and sensors that detect our fluid balance are also involved. If we begin to lose too much water and start to become 'hypovolemic' ( a loss of blood plasma volume) these baroreceptors sense a drop in blood pressure and fluid sensors will begin to put the brakes on the sweating process in efforts to reverse the fluid loss.
The body has many types of sensors (e.g. chemoreceptors that detect blood oxygen, carbon dioxide and pH) designed to keep critical bodily functions in balance. Fluid volume is one of those parameters. And because hypovolemia can actually be life threatening, that's the reason we need to stay hydrated (drink fluids) during intense exercise or heat waves.
Sweating and Non-thermal Sensors