     bpresence = false;
   }
 
-  if (!bpresence && ir_data.ac_presence_mode == 1)
+  if (!bpresence && (ir_data.ac_presence_mode == 1))
   {
     Serial.println("[IR] -----> AC Power Down");
     lgWhisen.power_down();

      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;
        }
      }
    }

    if (root.containsKey("ac_mode"))


void ICACHE_RAM_ATTR parseMqttMsg(String receivedpayload, String receivedtopic)
{
  char json[] = "{\"ac_mode\":0,\"ac_temp\":27,\"ac_flow\":2}";

  receivedpayload.toCharArray(json, 150);
  StaticJsonBuffer<150> jsonBuffer;
