Added feels like and kmph wind for currentweather module

This commit is contained in:
Pranav Sethi 2018-03-12 05:06:16 -04:00
parent b9b9773df9
commit 7285ada9dd
3 changed files with 12 additions and 2 deletions

View File

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
## [2.4.0] - Unreleased
### Added
- Add two new configuration options for currentweather module.
- `showFeelsLike`: Shows how it actually feels like (wind chill or heat index)
- `useKMPHwind`: adds an option to see wind speed in Kmph instead of just m/s or Beaufort
## [2.3.0] - Unreleased
### Added

View File

@ -43,7 +43,9 @@ The following properties can be configured:
| `showWindDirectionAsArrow` | Show the wind direction as an arrow instead of abbreviation <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `showHumidity` | Show the current humidity <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `showIndoorTemperature` | If you have another module that emits the INDOOR_TEMPERATURE notification, the indoor temperature will be displayed <br> **Default value:** `false`
| `onlyTemp` | Show only current Temperature and weather icon without windspeed, sunset and sunrise time. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `onlyTemp` | Show only current Temperature and weather icon without windspeed, sunset, sunrise time and feels like. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
| `showFeelsLike` | Shows the Feels like temperature weather. <br><br> **Possible Values:**`true` or `false`<br>**Default Values: `true`**
| `useKMPHWind` | Uses KMPH as units for windspeed. <br><br> **Possible Values:**`true` or `false`<br>**Default Values: `false`**
| `useBeaufort` | Pick between using the Beaufort scale for wind speed or using the default units. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
| `lang` | The language of the days. <br><br> **Possible values:** `en`, `nl`, `ru`, etc ... <br> **Default value:** uses value of _config.language_
| `decimalSymbol` | The decimal symbol to use.<br><br> **Possible values:** `.`, `,` or any other symbol.<br> **Default value:** `.`

View File

@ -430,7 +430,7 @@ Module.register("currentweather",{
+ 1.22874*Math.pow(10,-3)*tempInF*tempInF*this.humidity
+ 8.5282*Math.pow(10,-4)*tempInF*this.humidity*this.humidity
- 1.99*Math.pow(10,-6)*tempInF*tempInF*this.humidity*this.humidity;
// this.feelsLike = Hindex.toFixed(0);
switch (this.config.units){
case "metric": this.feelsLike = Hindex.toFixed(0);
break;