 void loop() {
   server.handleClient();
   unsigned long currentMillis = millis();
-  if (currentMillis - previousMillis >= interval) {
-    previousMillis = currentMillis;
-    latemp();
+  if (usesenseur == 1) {
+    if (currentMillis - previousMillis >= interval) {
+      previousMillis = currentMillis;
+      latemp();
+    }
   }
   if (flashoufade == 1) {
     currentMillis = millis();

#include <WiFiMulti.h>
#include <HTTPClient.h>
#include <Preferences.h>

Preferences preferences;

// sensors stuff
#include <Wire.h>
#include <DallasTemperature.h>
#include <DHT.h>
#include <ESPmDNS.h>
#define ONE_WIRE_BUS 5 //dallas sensor pin
#define DHTPIN 15 // dht sensor pin
#define DHTTYPE DHT11 //dht type 11 or 22
DHT dht(DHTPIN, DHTTYPE);
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
// end of sensors

  Serial.println("");
  Serial.println(addy);
  Serial.println("!!! PAGE DE SETUP !!!");
  int ouireset = 0;
  String testteu = server.arg("RESET");
  //  String passme = server.arg("PASSME");
  String noupass = server.arg("LAPASSE");
  String lakey = server.arg("APIKEY");
  String lechan = server.arg("CHANEL");
  String theuse = server.arg("LEUSE");
  int leuse = 0;
  if (theuse == "usemoi") {
    leuse = 1;
  } else {
    leuse = 0;
  }
  logtourne();
  logs[1] = addy;
  logs[1] += " : Settings !";
  logs[1].replace("<", "</"); //prevent html tags in logs so hackers cant code in log page lol
  if (!server.authenticate(www_username, string2char(resetpass))) {
    Serial.println("pas/mauvais password");
    logs[1] += " Not logged in !";
    return server.requestAuthentication();
  }
  if (testteu == "OUI") {
    ouireset = 1;
    if (noupass == "") {
      ouireset = 3;
    }
    if (lakey == "") {
      ouireset = 3;
    }
    if (lechan == "") {
      ouireset = 3;
    }
  }
  String contenu = "<!DOCTYPE html>\n<html lang=\"en\" dir=\"ltr\" class=\"client-nojs\">\n<head>\n";
