Optimal Temperature Sensor Based on a Sensitive Material