mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-27 00:16:44 +00:00
Refactor common weather methods into utils class (#2958)
Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* global WeatherProvider, WeatherObject */
|
||||
/* global WeatherProvider, WeatherObject, WeatherUtils */
|
||||
|
||||
/* MagicMirror²
|
||||
* Module: Weather
|
||||
@@ -163,7 +163,7 @@ WeatherProvider.register("envcanada", {
|
||||
currentWeather.temperature = this.cacheCurrentTemp;
|
||||
}
|
||||
|
||||
currentWeather.windSpeed = currentWeather.convertWindToMs(ECdoc.querySelector("siteData currentConditions wind speed").textContent);
|
||||
currentWeather.windSpeed = WeatherUtils.convertWindToMs(ECdoc.querySelector("siteData currentConditions wind speed").textContent);
|
||||
|
||||
currentWeather.windDirection = ECdoc.querySelector("siteData currentConditions wind bearing").textContent;
|
||||
|
||||
|
Reference in New Issue
Block a user