   if (sensorData.hall == sensorThresholds.door) {
     status = HIGH;
   }
+  if (sensorData.tempInsideC < sensorThresholds.minTempInsideC) {
+    status = HIGH;
+  }
+  if (sensorData.tempInsideC > sensorThresholds.maxTempInsideC) {
+    status = HIGH;
+  }
   return status;
 }
 


//------------------------------------------------------------------------------
void handle_thresholds(RestRequest *request, EthernetClient *client) {
  char content[32] = { '\0' };
  char buffer[16] = { '\0' };
  strcat(content, "{");
  sprintf_int_field(buffer, true, "light", sensorThresholds.light);
  strcat(content, buffer);  
  sprintf_int_field(buffer, false, "door", sensorThresholds.door);
  strcat(content, buffer);  
  strcat(content, "}");
  restServer.generate_response(client, content);

struct SensorThresholds {
  unsigned int light;
  unsigned int door;
  float minTempInsideC;
  float maxTempInsideC;
};

// Controller MAC address - must be unique on network for DHCP to work
