diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md index 2ce54aac..3be92edb 100644 --- a/modules/default/currentweather/README.md +++ b/modules/default/currentweather/README.md @@ -97,6 +97,13 @@ The following properties can be configured:
Default value: false + + useBeaufort + Pick between using the Beaufort scale for wind speed or using the default units.
+
Possible values: true or false +
Default value: true + + lang The language of the days.
diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 4ab04c4f..fb557935 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -20,6 +20,7 @@ Module.register("currentweather",{ showPeriod: true, showPeriodUpper: false, showWindDirection: false, + useBeaufort: true, lang: config.language, initialLoadDelay: 0, // 0 seconds delay @@ -204,7 +205,14 @@ Module.register("currentweather",{ */ processWeather: function(data) { this.temperature = this.roundValue(data.main.temp); - this.windSpeed = this.ms2Beaufort(this.roundValue(data.wind.speed)); + + if (this.config.useBeaufort){ + this.windSpeed = this.ms2Beaufort(this.roundValue(data.wind.speed)); + }else { + this.windSpeed = parseFloat(data.wind.speed).toFixed(0); + } + + this.windDirection = this.deg2Cardinal(data.wind.deg); this.weatherType = this.config.iconTable[data.weather[0].icon];