Skip to content

Commit fdacf82

Browse files
authored
Merge pull request #1337 from ShameerAshraf/develop
Fixed Wind Chill and Heat Index for Kelvin
2 parents c8c1461 + 5c01a44 commit fdacf82

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
4040
- Newsfeed now remembers to show the description when `"ARTICLE_LESS_DETAILS"` is called if the user wants to always show the description. [#1282](https://github.com/MichMich/MagicMirror/issues/1282)
4141
- `clientonly/*.js` is now linted, and one linting error is fixed
4242
- Fix issue #1196 by changing underscore to hyphen in locale id, in align with momentjs.
43+
- Fixed issue where heat index and wind chill were reporting incorrect values in Kelvin. [#1263](https://github.com/MichMich/MagicMirror/issues/1263)
4344

4445
### Updated
4546
- Updated Italian translation

modules/default/currentweather/currentweather.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ Module.register("currentweather",{
417417
case "imperial": this.feelsLike = windChillInF.toFixed(0);
418418
break;
419419
case "default":
420-
var tc = windChillInC - 273.15;
420+
var tc = windChillInC + 273.15;
421421
this.feelsLike = tc.toFixed(0);
422422
break;
423423
}
@@ -437,7 +437,7 @@ Module.register("currentweather",{
437437
case "imperial": this.feelsLike = Hindex.toFixed(0);
438438
break;
439439
case "default":
440-
var tc = Hindex - 273.15;
440+
var tc = parseFloat((Hindex - 32) / 1.8) + 273.15;
441441
this.feelsLike = tc.toFixed(0);
442442
break;
443443
}

0 commit comments

Comments
 (0)