From ba8685a122d824d21b8d242d96b8aa5d9cc7c8cf Mon Sep 17 00:00:00 2001 From: fwitte Date: Sat, 5 Jan 2019 13:13:53 +0100 Subject: [PATCH 1/2] readded degreesign --- modules/default/currentweather/currentweather.js | 13 ++++++++----- modules/default/weatherforecast/weatherforecast.js | 9 ++++++--- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 7285bd2e..2a6d24b9 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -198,16 +198,19 @@ Module.register("currentweather",{ large.appendChild(weatherIcon); var degreeLabel = ""; - if (this.config.degreeLabel) { - switch (this.config.units ) { + if (this.config.units === "metric" || this.config.units === "imperial") { + degreeLabel += "°"; + } + if(this.config.degreeLabel) { + switch(this.config.units) { case "metric": - degreeLabel = " °C"; + degreeLabel += "C"; break; case "imperial": - degreeLabel = " °F"; + degreeLabel += "F"; break; case "default": - degreeLabel = " K"; + degreeLabel += "K"; break; } } diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index 3afc7f74..67193696 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -143,16 +143,19 @@ Module.register("weatherforecast",{ iconCell.appendChild(icon); var degreeLabel = ""; + if (this.config.units === "metric" || this.config.units === "imperial") { + degreeLabel += "°"; + } if(this.config.scale) { switch(this.config.units) { case "metric": - degreeLabel = " °C"; + degreeLabel += "C"; break; case "imperial": - degreeLabel = " °F"; + degreeLabel += "F"; break; case "default": - degreeLabel = " K"; + degreeLabel = "K"; break; } } From c2ff949f2d6d11e852c813b8d5e784f3d9752406 Mon Sep 17 00:00:00 2001 From: fwitte Date: Sat, 5 Jan 2019 13:14:10 +0100 Subject: [PATCH 2/2] adjusted CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75a849a2..51c62ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Bumped the Electron dependency to v3.0.13 to support the most recent Raspbian. [#1500](https://github.com/MichMich/MagicMirror/issues/1500) ### Fixed -- Fixed temperature displays in currentweather and weatherforecast modules [#1503](https://github.com/MichMich/MagicMirror/issues/1503). +- Fixed temperature displays in currentweather and weatherforecast modules [#1503](https://github.com/MichMich/MagicMirror/issues/1503), [#1511](https://github.com/MichMich/MagicMirror/issues/1511). - Fixed unhandled error on bad git data in updatenotiifcation module [#1285](https://github.com/MichMich/MagicMirror/issues/1285). - Weather forecast now works with openweathermap in new weather module. Daily data are displayed, see issue [#1504](https://github.com/MichMich/MagicMirror/issues/1504).