you could use a thermostat to make the light come on when it get's to hot or to cold, but making a dimmer work would be pretty difficult.
when I was testing my room, I used a t-stat,12v battery and a trailer brake light.
set the temp for 85, if it went above, the light would come on.