       }
 
       brightness = new_brightness;
-
     }
   }
-
-  // Update temperature every TMP_INTER minutes
-  if (millis() - last_temp_millis > TMP_INTER*60000) {
-    updateTemperature();
-  }
-}
-
-
-void updateTemperature() {
-  Serial.print("Requesting temperature...");
-
-  temp_sensor.requestTemperatures(); // Send the command to get temperatures
-  Serial.println("DONE");
-  // After we got the temperatures, we can print them here.
-  // We use the function ByIndex, and as an example get the temperature from the first sensor only.
-  Serial.print("Temperature is: ");
-  Serial.println(temp_sensor.getTempCByIndex(0));
-
-  temperature = temp_sensor.getTempCByIndex(0);
-
-  temp_mqtt.publish(temperature);
-
-  last_temp_millis = millis();
 }
 
 

      i = 0;

    }
    // Check if the brightness setting has been updated
    else if (strncmp((char *)onoffsw.lastread, "{\"Brightness\":", 14) == 0 ) {

      Serial.print(F("Brightness: "));

#include <ESP8266WiFi.h>
#include "Adafruit_MQTT.h"
#include "Adafruit_MQTT_Client.h"
