diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2a4ce8ce..40523dc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,11 +17,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Add test of match current week number on clock module with showWeek configuration.
- Add test default modules present modules/default/defaultmodules.js.
- Add unit test calendar_modules function capFirst.
+- Add support for showing wind direction as an arrow instead of abbreviation in currentWeather module.
- Add support for writing translation fucntions to support flexible word order
- Add test for check if exits the directories present in defaults modules.
- Add ability for `currentweather` module to display indoor temperature via INDOOR_TEMPERATURE notification
-
### Updated
- Added missing keys to Polish translation.
- Added missing key to German translation.
diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md
index a01d6d86..c5ba6108 100644
--- a/modules/default/currentweather/README.md
+++ b/modules/default/currentweather/README.md
@@ -40,6 +40,7 @@ The following properties can be configured:
| `showPeriod` | Show the period (am/pm) with 12 hour format
**Possible values:** `true` or `false`
**Default value:** `true`
| `showPeriodUpper` | Show the period (AM/PM) with 12 hour format as uppercase
**Possible values:** `true` or `false`
**Default value:** `false`
| `showWindDirection` | Show the wind direction next to the wind speed.
**Possible values:** `true` or `false`
**Default value:** `true`
+| `showWindDirectionAsArrow` | Show the wind direction as an arrow instead of abbreviation
**Possible values:** `true` or `false`
**Default value:** `false`
| `showHumidity` | Show the current humidity
**Possible values:** `true` or `false`
**Default value:** `false`
| `showIndoorTemperature` | If you have another module that emits the INDOOR_TEMPERATURE notification, the indoor temperature will be displayed
**Default value:** `false`
| `onlyTemp` | Show only current Temperature and weather icon.
**Possible values:** `true` or `false`
**Default value:** `false`
diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js
index 4a73dc51..324beda8 100644
--- a/modules/default/currentweather/currentweather.js
+++ b/modules/default/currentweather/currentweather.js
@@ -21,6 +21,7 @@ Module.register("currentweather",{
showPeriod: true,
showPeriodUpper: false,
showWindDirection: true,
+ showWindDirectionAsArrow: false,
useBeaufort: true,
lang: config.language,
showHumidity: false,
@@ -95,6 +96,7 @@ Module.register("currentweather",{
this.windSpeed = null;
this.windDirection = null;
+ this.windDeg = null;
this.sunriseSunsetTime = null;
this.sunriseSunsetIcon = null;
this.temperature = null;
@@ -124,7 +126,13 @@ Module.register("currentweather",{
if (this.config.showWindDirection) {
var windDirection = document.createElement("sup");
- windDirection.innerHTML = " " + this.translate(this.windDirection);
+ if (this.config.showWindDirectionAsArrow) {
+ if(this.windDeg !== null) {
+ windDirection.innerHTML = " ";
+ }
+ } else {
+ windDirection.innerHTML = " " + this.translate(this.windDirection);
+ }
small.appendChild(windDirection);
}
var spacer = document.createElement("span");
@@ -346,6 +354,7 @@ Module.register("currentweather",{
this.windDirection = this.deg2Cardinal(data.wind.deg);
+ this.windDeg = data.wind.deg;
this.weatherType = this.config.iconTable[data.weather[0].icon];
var now = new Date();