mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Added Feels Like and Windspeed in KMPH
This commit is contained in:
parent
d93f5d7785
commit
a6f08a09d5
@ -395,11 +395,14 @@ Module.register("currentweather",{
|
|||||||
|
|
||||||
var tempInF = 0;
|
var tempInF = 0;
|
||||||
switch (this.config.units){
|
switch (this.config.units){
|
||||||
case "metric": tempInF = 1.8 * this.temperature + 32; break;
|
case "metric": tempInF = 1.8 * this.temperature + 32;
|
||||||
case "imperial": tempInF = this.temperature; break;
|
break;
|
||||||
case "default":
|
case "imperial": tempInF = this.temperature;
|
||||||
var tc = this.temperature - 273.15;
|
break;
|
||||||
tempInF = 1.8 * tc + 32; break;
|
case "default":
|
||||||
|
var tc = this.temperature - 273.15;
|
||||||
|
tempInF = 1.8 * tc + 32;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (windInMph > 3 && tempInF < 50){
|
if (windInMph > 3 && tempInF < 50){
|
||||||
@ -409,11 +412,14 @@ Module.register("currentweather",{
|
|||||||
// this.feelsLike = windChillInC.toFixed(0);
|
// this.feelsLike = windChillInC.toFixed(0);
|
||||||
|
|
||||||
switch (this.config.units){
|
switch (this.config.units){
|
||||||
case "metric": this.feelsLike = windChillInC.toFixed(0); break;
|
case "metric": this.feelsLike = windChillInC.toFixed(0);
|
||||||
case "imperial": this.feelsLike = windChillInF.toFixed(0); break;
|
break;
|
||||||
case "default":
|
case "imperial": this.feelsLike = windChillInF.toFixed(0);
|
||||||
var tc = windChillInC - 273.15;
|
break;
|
||||||
this.feelsLike = tc.toFixed(0); break;
|
case "default":
|
||||||
|
var tc = windChillInC - 273.15;
|
||||||
|
this.feelsLike = tc.toFixed(0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (tempInF > 80 && this.humidity > 40){
|
} else if (tempInF > 80 && this.humidity > 40){
|
||||||
@ -428,11 +434,14 @@ Module.register("currentweather",{
|
|||||||
// this.feelsLike = Hindex.toFixed(0);
|
// this.feelsLike = Hindex.toFixed(0);
|
||||||
|
|
||||||
switch (this.config.units){
|
switch (this.config.units){
|
||||||
case "metric": this.feelsLike = Hindex.toFixed(0); break;
|
case "metric": this.feelsLike = Hindex.toFixed(0);
|
||||||
case "imperial": this.feelsLike = parseFloat(Hindex * 1.8 + 32).toFixed(0); break;
|
break;
|
||||||
case "default":
|
case "imperial": this.feelsLike = parseFloat(Hindex * 1.8 + 32).toFixed(0);
|
||||||
var tc = Hindex - 273.15;
|
break;
|
||||||
this.feelsLike = tc.toFixed(0); break;
|
case "default":
|
||||||
|
var tc = Hindex - 273.15;
|
||||||
|
this.feelsLike = tc.toFixed(0);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user