Weather: Fix 'feels like' temp being in wrong units

master^2
Rengyr 2025-08-16 22:36:47 +02:00
parent 6f9b5ad0b4
commit 6e00270287
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ function update(weatherEvent) {
exports.emit("update", weather); exports.emit("update", weather);
} else if (weather1.weather != null && weather1.weather.feels === undefined) { } else if (weather1.weather != null && weather1.weather.feels === undefined) {
// Grab feels like temperature as we have it in v2 // Grab feels like temperature as we have it in v2
weather1.weather.feels = decodeWeatherV2FeelsLike(weatherEvent); weather1.weather.feels = decodeWeatherV2FeelsLike(weatherEvent) + 273;
storage.write("weather.json", weather1); storage.write("weather.json", weather1);
exports.emit("update", weather1); exports.emit("update", weather1);
} }
@ -290,7 +290,7 @@ function downgradeWeatherV2(weather2) {
wdir: weather2.wdir, wdir: weather2.wdir,
wrose: weather2.wrose, wrose: weather2.wrose,
loc: weather2.loc, loc: weather2.loc,
feels: weather2.feels, feels: weather2.feels + 273,
}; };
return json; return json;