   irdaikin.daikin_sendCommand();
   isOn = MODE_DEHUMIDIFIER;
   resend++;
-  timeElapsed = 0;            // reset mode-switch timer
 
   // report this state change
   qmoteCmd = "ATBN=0x0A,\"dehumidifier ON\"\r\n"; // using click combination code 0x0A, --..

    if(timeElaspedInMinutes >= KEEP_ONOFF_TIMER)
    {
      // Since there is no beep now (I took off the buzzer on the air conditioning set), resend the same command every KEEP_ONOFF_TIMER in case the previous IR is missed
      resend = RESEND_ATTEMPS - 1;
      
      // determine the air conditioning state
      if(isOn == MODE_OFF)

           (((float) currentTemp) <= ((float) TEMP_TOO_LOW)))                           // humidifier goes too far, stop the air conditioning temperarily
        {
          daikin_all_off();
          timeElapsed = 0;  // reset mode-switch timer
        }
        else if((((float) currentTemp) > ((float) TEMP_LOW) && currentRh < RH_LOW) ||   // humidity reaches low but temperature is higher than low
                ((float) currentTemp > (float) TEMP_HIGH))                              // if high temp reached, switch to cooling
        {
          daikin_cooling_on();
          timeElapsed = 0;  // reset mode-switch timer
        }
      }
    } // end if(timeElaspedInMinutes >= KEEP_ONOFF_TIMER)
