Programmable temperature detector