     remoteClient.loop();
     
     if (millis() - lastPublishTime > publishingPeriod) {
-      lastPublishTime = millis();
+      lastPublishTime = millis(); 
       remoteClient.publishTemperature(temp);
       delay(200);
       remoteClient.publishSetTemperature(targetTemp);

    
    pinMode(HEAT_PIN, OUTPUT);
    pinMode(COOL_PIN, OUTPUT);
    digitalWrite(HEAT_PIN, HIGH);
    digitalWrite(COOL_PIN, HIGH);
    
    publishingPeriod = publishingPeriod > 200 ? publishingPeriod : 200;


#include <PubSubClient.h> 
#include <ESP8266WiFi.h>
#include <DHT.h>
#include <EEPROM.h>
