mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Thoroughly check for precipitationAmount values in weathergov provider (#3859)
Fixes #3856 --------- Co-authored-by: veeck <gitkraken@veeck.de>
This commit is contained in:
@@ -29,8 +29,9 @@ Thanks to: @dathbe.
|
||||
|
||||
### Fixed
|
||||
|
||||
- [calendar] Fixed broken unittest that only broke at 1st of july and 1st of january (#3830)
|
||||
- [calendar] Fixed broken unittest that only broke on the 1st of July and 1st of january (#3830)
|
||||
- [clock] Fixed missing icons when no other modules with icons is loaded (#3834)
|
||||
- [weather] Fixed handling of empty values in weathergov providers handling of precipitationAmount (#3859)
|
||||
|
||||
## [2.32.0] - 2025-07-01
|
||||
|
||||
|
@@ -218,7 +218,7 @@ WeatherProvider.register("weathergov", {
|
||||
currentWeather.minTemperature = currentWeatherData.minTemperatureLast24Hours.value;
|
||||
currentWeather.maxTemperature = currentWeatherData.maxTemperatureLast24Hours.value;
|
||||
currentWeather.humidity = Math.round(currentWeatherData.relativeHumidity.value);
|
||||
currentWeather.precipitationAmount = currentWeatherData.precipitationLastHour.value ? currentWeatherData.precipitationLastHour.value : currentWeatherData.precipitationLast3Hours.value;
|
||||
currentWeather.precipitationAmount = currentWeatherData.precipitationLastHour?.value ?? currentWeatherData.precipitationLast3Hours?.value;
|
||||
if (currentWeatherData.heatIndex.value !== null) {
|
||||
currentWeather.feelsLikeTemp = currentWeatherData.heatIndex.value;
|
||||
} else if (currentWeatherData.windChill.value !== null) {
|
||||
|
Reference in New Issue
Block a user