Here's an interesting thing about fire sprinklers: They only work once.
Well, the sprinklers themselves work more than once, but they rely on a tiny glass bulb that is designed to shatter in the event of a fire, allowing the water to spray through the sprinkler head. Once a fire has been put out, the water supply needs to be shut off so that the sprinkler head can be popped open and the bulb replaced.
In other words, the sprinkler itself is basically just a sprinkler head plugged directly into the building's water supply. There aren't really any moving parts in there besides the little clasp used to hold the bulb in place and block the water, it's just a water pipe being held shut by a tiny little bulb that explodes in a fire. You couldn't really ask for a simpler, more to-the-point design than the way a fire sprinkler is built... and you shouldn't when we're talking about something designed to save lives.
The bulb contains a glycerin-based liquid that expands in the heat, and when the temperature reaches whatever it's been calibrated to, it gets to be too much for the bulb, and it pops. You could get the same effect by placing a thermometer over a campfire, not that we'd recommend trying that at home.
This should clear it up as to whether it's the smoke or the heat that sets the sprinklers off. Now, the next time you're watching a movie and a character uses a cigarette lighter to set the fire sprinklers off throughout the entire building by holding it under a single sprinkler, you'll know that the writer didn't do their research-only the sprinklers that are actually subjected to the heat are designed to go off.