Skip to content

Commit b8a09e7

Browse files
committed
Windchill Calculation Bugfix
1 parent 4ff648f commit b8a09e7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

code.gs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,8 @@ function refreshFromWeatherflow_() {
544544
};
545545
} else if (conditions.temp != null && conditions.windSpeed != null) {
546546
conditions.windChill = {
547-
"f": conditions.temp.f.windChillF(conditions.windSpeed).toFixedNumber(2),
548-
"c": conditions.temp.c.windChillC(conditions.windSpeed).toFixedNumber(2)
547+
"f": conditions.temp.f.windChillF(conditions.windSpeed.mph).toFixedNumber(2),
548+
"c": conditions.temp.c.windChillC(conditions.windSpeed.mph).toFixedNumber(2)
549549
};
550550
};
551551
if (weatherflowConditions.obs[0].heat_index != null) {
@@ -915,8 +915,8 @@ function doPost(request) {
915915
};
916916
if (receivedJSON.humidity != null) conditions.humidity = Number(receivedJSON.humidity).toFixedNumber(0);
917917
if (conditions.temp != null && conditions.windSpeed != null) conditions.windChill = {
918-
"f": conditions.temp.f.windChillF(conditions.windSpeed).toFixedNumber(2),
919-
"c": conditions.temp.c.windChillC(conditions.windSpeed).toFixedNumber(2)
918+
"f": conditions.temp.f.windChillF(conditions.windSpeed.mph).toFixedNumber(2),
919+
"c": conditions.temp.c.windChillC(conditions.windSpeed.mph).toFixedNumber(2)
920920
}
921921
if (conditions.temp != null && conditions.humidity != null) conditions.heatIndex = {
922922
"f": conditions.temp.f.heatIndex(conditions.humidity, 'F').toFixedNumber(2),

0 commit comments

Comments
 (0)