diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4dd12cc9..b6372749 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- optionally display probability of precipitation (PoP) in current weather (UK Met Office data)
- automatically try to fix eslint errors by passing `--fix` option to it
- Added sunrise and sunset times to weathergov weather provider [#1705](https://github.com/MichMich/MagicMirror/issues/1705)
+- Added "useLocationAsHeader" to display "location" in `config.js` as header when location name is not returned
### Updated
- English translation for "Feels" to "Feels like"
diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md
index a88eeaf1..0ce7d59a 100644
--- a/modules/default/currentweather/README.md
+++ b/modules/default/currentweather/README.md
@@ -60,6 +60,7 @@ The following properties can be configured:
| `apiBase` | The OpenWeatherMap base URL.
**Default value:** `'http://api.openweathermap.org/data/'`
| `weatherEndpoint` | The OpenWeatherMap API endPoint.
**Default value:** `'weather'`
| `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.
**Default value:** `true`
+| `useLocationAsHeader` | If set to `true` and location is given a value, the value of location will be used as the header. This is useful if `locationName` was not returned.
**Default value:** `false`
| `calendarClass` | The class for the calender module to base the event based weather information on.
**Default value:** `'calendar'`
| `iconTable` | The conversion table to convert the weather conditions to weather-icons.
**Default value:** view tabel below.
diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js
index ffafd6a0..562baf31 100644
--- a/modules/default/currentweather/currentweather.js
+++ b/modules/default/currentweather/currentweather.js
@@ -23,6 +23,7 @@ Module.register("currentweather",{
showWindDirection: true,
showWindDirectionAsArrow: false,
useBeaufort: true,
+ appendLocationNameToHeader: false,
useKMPHwind: false,
lang: config.language,
decimalSymbol: ".",
@@ -269,6 +270,10 @@ Module.register("currentweather",{
return this.data.header + " " + this.fetchedLocationName;
}
+ if (this.config.useLocationAsHeader && this.config.location !== false) {
+ return this.config.location;
+ }
+
return this.data.header;
},