         break;
       case 0x20DF10EF: // tv remore on/off
         tvPowerStatus = ! tvPowerStatus ;
+        if ( tvPowerStatus == 1 ){
+          timerOnOff = 0 ;
+        }
+        t = !t;
         r = !r;
         break;
     }


// timer
long startMills;
long tv_off_Mills;
long tv_on_Mills;
long tempMills;
long o_tempMills;
long pir_Mills;

// temp
int o_tempminpassed = 0;

  startMills = millis();
  tempMills = millis();
  o_tempMills = millis();
  tv_onoff_Mills = millis();

  // lcd
  lcd.init();
