Mount the thermostat in the attic.
Install attic fan thermostat switch.
Make one of your wires from the 12 2 either red or black a direct power to your thermostat.
Run a 12 3 w ground from switch box to fan thermostat box.
Leave enough cable at each end to work with.
Screw this box to the plywood so it s in the direct path of the airflow step 11.
Place it so it s facing in the direction of the air that s being drawn out of the attic by the fan.
Step 1 secure the switch.
Remove the cover of the thermostat to expose the black and white wires as well as the green ground screw.
Run nm cable from the attic fan thermostat to the attic light.
Ideally the thermostat should be mounted to a rafter along the wiring path and away from the draft of the fan.
Use the hammer and staples to secure the cable to the joists at 12 inch intervals.