File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
modules/default/weather/providers Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ WeatherProvider.register("envcanada", {
208208 * Fixed value + Prov code specified in Weather module Config.js + current hour as GMT
209209 */
210210 getUrl ( ) {
211- let forecastURL = `https://dd.weather.gc.ca/citypage_weather/${ this . config . provCode } ` ;
211+ let forecastURL = `https://dd.weather.gc.ca/today/ citypage_weather/${ this . config . provCode } ` ;
212212 const hour = this . getCurrentHourGMT ( ) ;
213213 forecastURL += `/${ hour } /` ;
214214 return forecastURL ;
@@ -243,8 +243,13 @@ WeatherProvider.register("envcanada", {
243243 } else {
244244 currentWeather . temperature = this . cacheCurrentTemp ;
245245 }
246+
247+ if ( ECdoc . querySelector ( "siteData currentConditions wind speed" ) . textContent === "calm" ) {
248+ currentWeather . windSpeed = "0" ;
249+ } else {
250+ currentWeather . windSpeed = WeatherUtils . convertWindToMs ( ECdoc . querySelector ( "siteData currentConditions wind speed" ) . textContent ) ;
251+ }
246252
247- currentWeather . windSpeed = WeatherUtils . convertWindToMs ( ECdoc . querySelector ( "siteData currentConditions wind speed" ) . textContent ) ;
248253 currentWeather . windFromDirection = ECdoc . querySelector ( "siteData currentConditions wind bearing" ) . textContent ;
249254
250255 currentWeather . humidity = ECdoc . querySelector ( "siteData currentConditions relativeHumidity" ) . textContent ;
You can’t perform that action at this time.
0 commit comments