Yes, if there're sprinkler heads in the elevator shaft or in the elevator machine room, there has to be heat detectors interlocked to turn off the Shunt-Trip Circuit Breaker.
When the sprinkler heads start spraying water on the elevator or the elevator equipment, the elevator can careen out of control. The heat detectors are to stop the elevator where it's at. . . before the sprinklers activate.
The heat detectors, placed within two feet of each sprinkler head in the hoistway, and in the machine room, are supposed to activate at a lower temperature than the sprinkler heads. So that the water from the sprinkler head doesn't cool down the heat detector, preventing the heat detector from sensing heat, the activation temperature of the heat detector has to be lower than the sprinkler head. Then, when any of the heat detectors activate, a shunt signal goes to the Shunt-Trip Circuit Breaker to stop the elevator.
The rules and codes requiring the sprinkler heads to be in the shaft or equipment room vary by state, and with the different federal, state, and local agencies that oversee the fire protection systems. However, all rules and codes specify that if there are sprinkler heads, there will be the heat sensing safeguard (heat detectors) within two feet of each sprinkler head, and these heat detectors will activate at a lower temperature than the sprinkler heads.