mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
Fix envcanada today pop (#3106)
Fix for today's probability-of-precipitation weather module's envcanada
provider.
Without which, requesting `showPrecipitationProbability` causes
"undefined" to be shown.
Consistent with method used elsewhere in the file:
abe5c08a52/modules/default/weather/providers/envcanada.js (L395-L399)
This commit is contained in:
@@ -34,6 +34,7 @@ _This release is scheduled to be released on 2023-07-01._
|
|||||||
- Fix style issues after eslint-plugin-jsdoc update
|
- Fix style issues after eslint-plugin-jsdoc update
|
||||||
- Fix don't filter out ongoing full day events (#3095)
|
- Fix don't filter out ongoing full day events (#3095)
|
||||||
- Fix date not shown when clock in analog mode (#3100)
|
- Fix date not shown when clock in analog mode (#3100)
|
||||||
|
- Fix envcanada today percentage-of-precipitation (#3106)
|
||||||
|
|
||||||
## [2.23.0] - 2023-04-04
|
## [2.23.0] - 2023-04-04
|
||||||
|
|
||||||
|
@@ -505,9 +505,9 @@ WeatherProvider.register("envcanada", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check Today element for POP
|
// Check Today element for POP
|
||||||
|
const precipPOP = foreGroup[today].querySelector("abbreviatedForecast pop").textContent * 1.0;
|
||||||
if (foreGroup[today].querySelector("abbreviatedForecast pop").textContent > 0) {
|
if (precipPOP > 0) {
|
||||||
weather.precipitationProbability = foreGroup[today].querySelector("abbreviatedForecast pop").textContent;
|
weather.precipitationProbability = precipPOP;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user