diff --git a/README.md b/README.md index 588c61bd..4c935d31 100644 --- a/README.md +++ b/README.md @@ -77,6 +77,7 @@ The following properties can be configured: | `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. | | `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. | | `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. | +| `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. | | `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** | Module configuration: diff --git a/config/config.js.sample b/config/config.js.sample index 99ab2ead..0b5f45d4 100644 --- a/config/config.js.sample +++ b/config/config.js.sample @@ -9,6 +9,7 @@ var config = { language: 'en', timeFormat: 24, + units: 'metric', modules: [ { diff --git a/js/defaults.js b/js/defaults.js index e3dc3d2b..28cc2613 100644 --- a/js/defaults.js +++ b/js/defaults.js @@ -12,7 +12,8 @@ var defaults = { language: "en", timeFormat: 24, - + units: "metric", + modules: [ { module: "helloworld", diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 3a7520ce..6c6aa100 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -13,7 +13,7 @@ Module.register("currentweather",{ defaults: { location: "", appid: "", - units: "metric", + units: config.units, updateInterval: 10 * 60 * 1000, // every 10 minutes animationSpeed: 1000, timeFormat: config.timeFormat, diff --git a/modules/default/weatherforecast/weatherforecast.js b/modules/default/weatherforecast/weatherforecast.js index ff7c4190..c1e79828 100644 --- a/modules/default/weatherforecast/weatherforecast.js +++ b/modules/default/weatherforecast/weatherforecast.js @@ -13,7 +13,7 @@ Module.register("weatherforecast",{ defaults: { location: "", appid: "", - units: "metric", + units: config.units, updateInterval: 10 * 60 * 1000, // every 10 minutes animationSpeed: 1000, timeFormat: config.timeFormat,