Revert "Added autoLocation and autoTimezone option for weather modules and clock respectively."

This commit is contained in:
Michael Teeuw
2019-02-27 13:33:14 +01:00
committed by GitHub
parent de99c8a5e4
commit e4891e699f
7 changed files with 8 additions and 136 deletions

View File

@@ -26,7 +26,6 @@ Module.register("clock",{
analogShowDate: "top", // options: false, 'top', or 'bottom'
secondsColor: "#888888",
timezone: null,
autoTimezone: false
},
// Define required scripts.
getScripts: function() {
@@ -40,31 +39,16 @@ Module.register("clock",{
start: function() {
Log.info("Starting module: " + this.name);
if (this.config.autoTimezone) {
this.sendSocketNotification("AUTO_TIMEZONE");
} else {
// Schedule update interval.
var self = this;
setInterval(function() {
self.updateDom();
}, 1000);
}
// Schedule update interval.
var self = this;
setInterval(function() {
self.updateDom();
}, 1000);
// Set locale.
moment.locale(config.language);
},
socketNotificationReceived: function (notification, payload) {
if (notification === "UPDATE_TIMEZONE") {
var self = this;
self.config.timezone = payload.timezone;
setInterval(function() {
self.updateDom();
}, 1000);
}
},
// Override dom generator.
getDom: function() {