       if (ir_data.ac_temp != root["ac_temp"])
       {
         ir_data.ac_temp = root["ac_temp"];
-        
+
         if (ir_data.ac_mode == 1)
         {
           ir_data.haveData = true;
+          where_haveData_called = 1;
         }
       }
       ir_data.ac_flow = root["ac_flow"];

    Serial.println(WIFI_SSID);

    delay(10);
    WiFi.mode(WIFI_STA);
    WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
    WiFi.hostname("esp-irbedroom");

IPAddress mqtt_server = MQTT_SERVER;

String clientName;
String syslogPayload;
long lastReconnectAttempt = 0;

unsigned int localPort = 12390;
