  * Description    : converts the String mode into the int mode (to be saved in the eeprom)
  * Return         : String
  *******************************************************************************/
-uint8_t convertModeToInt( String mode )
-{
-  if ( mode == MODE_HEAT ){
+uint8_t convertModeToInt(String mode)
+{
+  if (mode == MODE_HEAT)
+  {
     return 1;
   }
-  if ( mode == MODE_COOL ){
+  if (mode == MODE_COOL)
+  {
     return 2;
   }
 
   //in all other cases
   return 0;
-
-}
+}


  //is there anything to update?
  // this code here takes care of the users having cycled the mode to the same original value
  if ( internalFan == externalFan ) {
    return;
  }

  //update the new setting from the external to the internal variable
  internalFan = externalFan;

  if ( internalFan ) {
    //Particle.publish(PUSHBULLET_NOTIF_PERSONAL, "Fan on" + getTime(), 60, PRIVATE);
    String tempStatus = "Fan on" + getTime();
    Particle.publish("googleDocs", "{\"my-name\":\"" + tempStatus + "\"}", 60, PRIVATE);
  } else {
    //Particle.publish(PUSHBULLET_NOTIF_PERSONAL, "Fan off" + getTime(), 60, PRIVATE);
    String tempStatus = "Fan off" + getTime();
    Particle.publish("googleDocs", "{\"my-name\":\"" + tempStatus + "\"}", 60, PRIVATE);

 * Description    : sets the state of the system
 * Return         : none
 *******************************************************************************/
void setState(String newState)
{
  state = newState;
#ifdef USE_BLYNK
  Blynk.virtualWrite(BLYNK_DISPLAY_STATE, state);
#endif
}

/*******************************************************************************/
