Merge branch 'develop' into patch-2

This commit is contained in:
Michael Teeuw
2017-05-01 14:29:14 +02:00
committed by GitHub
9 changed files with 106 additions and 16 deletions

View File

@@ -26,6 +26,7 @@ Module.register("currentweather",{
lang: config.language,
showHumidity: false,
degreeLabel: false,
showIndoorTemperature: false,
initialLoadDelay: 0, // 0 seconds delay
retryDelay: 2500,
@@ -99,6 +100,7 @@ Module.register("currentweather",{
this.sunriseSunsetTime = null;
this.sunriseSunsetIcon = null;
this.temperature = null;
this.indoorTemperature = null;
this.weatherType = null;
this.loaded = false;
@@ -211,6 +213,17 @@ Module.register("currentweather",{
temperature.innerHTML = " " + this.temperature + "°" + degreeLabel;
large.appendChild(temperature);
if (this.config.showIndoorTemperature && this.indoorTemperature) {
var indoorIcon = document.createElement("span");
indoorIcon.className = "fa fa-home";
large.appendChild(indoorIcon);
var indoorTemperatureElem = document.createElement("span");
indoorTemperatureElem.className = "bright";
indoorTemperatureElem.innerHTML = " " + this.indoorTemperature + "°" + degreeLabel;
large.appendChild(indoorTemperatureElem);
}
wrapper.appendChild(large);
return wrapper;
},
@@ -247,6 +260,10 @@ Module.register("currentweather",{
}
}
}
if (notification === "INDOOR_TEMPERATURE") {
this.indoorTemperature = this.roundValue(payload);
this.updateDom(self.config.animationSpeed);
}
},
/* updateWeather(compliments)