       digitalWrite(heatPin,HIGH);
       return;
     }
-  }
 
   // This executes if the AC is running and it gets cool enough to turn off
   if (coolRunning && (currentTemp < (cool - buffer))) {

  
  // Go through devices and read the temperatures
  for(int x = 0; x < numOfDevices; x++){
    temp = sensors.get_tempF(addrs[x]);
    if(temp != currentTemp){
      currentTemp = temp;
    }      

  Udp.beginPacket(address, 123); //NTP requests are to port 123
  Udp.write(packetBuffer,NTP_PACKET_SIZE);
  Udp.endPacket();
}
