       lcd.write(3);
     }
 
-      // if powered by TV
-      if ( o_pwrSrc == 1 ) {
-
-        // input change
-        o_offMode = 0;
-        tvPowerStatus = 1;
-        timerStatus = 1;
-
-        tvOnTimer();
-
-        lcd.setCursor(4, 1);
-        lcd.write(4);
-
-        lcd.setCursor(6, 1);
-        lcd.write(5);
-
-      } else {
-        timerStatus = 0 ;
-      }
+    // if powered by TV
+    if ( o_pwrSrc == 1 ) {
+
+      // input change
+      o_offMode = 0;
+      tvPowerStatus = 1;
+      timerStatus = 1;
+
+      tvOnTimer();
+
+      lcd.setCursor(4, 1);
+      lcd.write(4);
+
+      lcd.setCursor(6, 1);
+      lcd.write(5);
+
+    } else {
+      timerStatus = 0 ;
+    }
   }
 
   // event Timer

{
  tempCinside = getdalastemp();
  displayTemperature(tempCinside);
  if ( timerStatus == 1) {
    displaytimeleft();
  }
}

// update every 5 mins
void doUpdateTempCArray()
{
  for ( int i = 0 ; i < 11 ; i++ ) {
    tempCprevious[i] = tempCprevious[i+1]; 
  }
  tempCprevious[11] = tempCinside;
}


  lcd.print(Temperature, 1);

  if ( tempCprevious[0] != 100 ) {
    float tempdiff = tempCinside - tempCprevious[0];

    lcd.setCursor(8, 0);
