diff --git a/CHANGELOG.md b/CHANGELOG.md index d7e63e7e..476264b8 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - cleanup installers folder, remove externalized scripts ### Added -- Finnish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE". +- Finish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE". +- Added the ability to hide the temp label and weather icon in the `currentweather` module to allow showing only information such as wind and sunset/rise. ### Fixed - Force declaration of public ip adress in config file (ISSUE #1852) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 7d917132..dcf771af 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -44,6 +44,7 @@ Module.register("currentweather",{ calendarClass: "calendar", onlyTemp: false, + hideTemp: false, roundTemp: false, iconTable: { @@ -194,36 +195,38 @@ Module.register("currentweather",{ var large = document.createElement("div"); large.className = "large light"; - var weatherIcon = document.createElement("span"); - weatherIcon.className = "wi weathericon " + this.weatherType; - large.appendChild(weatherIcon); + if (this.config.hideTemp === true) { + var weatherIcon = document.createElement("span"); + weatherIcon.className = "wi weathericon " + this.weatherType; + large.appendChild(weatherIcon); - var degreeLabel = ""; - if (this.config.units === "metric" || this.config.units === "imperial") { - degreeLabel += "°"; - } - if(this.config.degreeLabel) { - switch(this.config.units) { - case "metric": - degreeLabel += "C"; - break; - case "imperial": - degreeLabel += "F"; - break; - case "default": - degreeLabel += "K"; - break; + var degreeLabel = ""; + if (this.config.units === "metric" || this.config.units === "imperial") { + degreeLabel += "°"; + } + if(this.config.degreeLabel) { + switch(this.config.units) { + case "metric": + degreeLabel += "C"; + break; + case "imperial": + degreeLabel += "F"; + break; + case "default": + degreeLabel += "K"; + break; + } } - } - if (this.config.decimalSymbol === "") { - this.config.decimalSymbol = "."; - } + if (this.config.decimalSymbol === "") { + this.config.decimalSymbol = "."; + } - var temperature = document.createElement("span"); - temperature.className = "bright"; - temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel; - large.appendChild(temperature); + var temperature = document.createElement("span"); + temperature.className = "bright"; + temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel; + large.appendChild(temperature); + } if (this.config.showIndoorTemperature && this.indoorTemperature) { var indoorIcon = document.createElement("span");