Skip to content

Commit f0c516e

Browse files
committed
CHANGED: The Weather Forecast module by default displays the ° symbol after every numeric value to be consistent with the Current Weather module.
1 parent f38203e commit f0c516e

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2020
- Screenshot for the weather forecast module
2121
- Portuguese translation for "Feels"
2222
- Fading for dateheaders timeFormat in Calendar [#1464](https://github.com/MichMich/MagicMirror/issues/1464)
23+
- Documentation for the existing `scale` option in the Weather Forecast module.
2324

2425
### Fixed
2526
- Allow to parse recurring calendar events where the start date is before 1900
@@ -30,6 +31,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3031
### Updated
3132
- The default calendar setting `showEnd` is changed to `false`.
3233

34+
### Changed
35+
- The Weather Forecast module by default displays the ° symbol after every numeric value to be consistent with the Current Weather module.
36+
37+
3338
## [2.5.0] - 2018-10-01
3439

3540
### Added

modules/default/weatherforecast/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,11 @@ The following properties can be configured:
5151
| `apiBase` | The OpenWeatherMap base URL. <br><br> **Default value:** `'http://api.openweathermap.org/data/'`
5252
| `forecastEndpoint` | The OpenWeatherMap API endPoint. <br><br> **Default value:** `'forecast/daily'`
5353
| `appendLocationNameToHeader` | If set to `true`, the returned location name will be appended to the header of the module, if the header is enabled. This is mainly intresting when using calender based weather. <br><br> **Default value:** `true`
54-
| `calendarClass` | The class for the calender module to base the event based weather information on. <br><br> **Default value:** `'calendar'`
54+
| `calendarClass` | The class for the calendar module to base the event based weather information on. <br><br> **Default value:** `'calendar'`
5555
| `tableClass` | Name of the classes issued from `main.css`. <br><br> **Possible values:** xsmall, small, medium, large, xlarge. <br> **Default value:** _small._
5656
| `iconTable` | The conversion table to convert the weather conditions to weather-icons. <br><br> **Default value:** view table below
57-
`colored` | If set 'colored' to true the min-temp get a blue tone and the max-temp get a red tone. <br><br> **Default value:** `'false'`
57+
| `colored` | If set `colored` to `true` the min-temp gets a blue tone and the max-temp gets a red tone. <br><br> **Default value:** `'false'`
58+
| `scale ` | If set to `true` the module will display `C` for Celsius degrees and `F` for Fahrenheit degrees after the number, based on the value of the `units` option, otherwise only the &deg; character is displayed. <br><br> **Default value:** `false`
5859

5960
#### Default Icon Table
6061
````javascript

modules/default/weatherforecast/weatherforecast.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -142,14 +142,14 @@ Module.register("weatherforecast",{
142142
icon.className = "wi weathericon " + forecast.icon;
143143
iconCell.appendChild(icon);
144144

145-
var degreeLabel = "";
145+
var degreeLabel = "&deg;";
146146
if(this.config.scale) {
147147
switch(this.config.units) {
148148
case "metric":
149-
degreeLabel = " &deg;C";
149+
degreeLabel += " C";
150150
break;
151151
case "imperial":
152-
degreeLabel = " &deg;F";
152+
degreeLabel += " F";
153153
break;
154154
case "default":
155155
degreeLabel = "K";

0 commit comments

Comments
 (0)