mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-29 12:39:45 +00:00
ran prettier...
This commit is contained in:
parent
1faefebe42
commit
463ce394fe
@ -176,11 +176,11 @@ WeatherProvider.register("envcanada", {
|
|||||||
generateWeatherObjectFromCurrentWeather(ECdoc) {
|
generateWeatherObjectFromCurrentWeather(ECdoc) {
|
||||||
const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
|
const currentWeather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits);
|
||||||
|
|
||||||
// There are instances where EC will update weather data and current temperature will not be
|
// There are instances where EC will update weather data and current temperature will not be
|
||||||
// provided. While this is a defect in the EC systems, we need to accommodate to avoid a current temp
|
// provided. While this is a defect in the EC systems, we need to accommodate to avoid a current temp
|
||||||
// of NaN being displayed. Therefore... whenever we get a valid current temp from EC, we will cache
|
// of NaN being displayed. Therefore... whenever we get a valid current temp from EC, we will cache
|
||||||
// the value. Whenever EC data is missing current temp, we will provide the cached value
|
// the value. Whenever EC data is missing current temp, we will provide the cached value
|
||||||
// instead. This is reasonable since the cached value will typically be accurate within the previous
|
// instead. This is reasonable since the cached value will typically be accurate within the previous
|
||||||
// hour. The only time this does not work as expected is when MM is restarted and the first query to
|
// hour. The only time this does not work as expected is when MM is restarted and the first query to
|
||||||
// EC finds no current temp. In this scenario, MM will end up displaying a current temp of null;
|
// EC finds no current temp. In this scenario, MM will end up displaying a current temp of null;
|
||||||
|
|
||||||
@ -519,7 +519,7 @@ WeatherProvider.register("envcanada", {
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Check for a Precipitation forecast. EC can provide a forecast in 2 ways: either an accumulation figure
|
// Check for a Precipitation forecast. EC can provide a forecast in 2 ways: either an accumulation figure
|
||||||
// or a POP percentage. If there is a POP, then that is what the module will show. If there is an accumulation,
|
// or a POP percentage. If there is a POP, then that is what the module will show. If there is an accumulation,
|
||||||
// then it will be displayed ONLY if no POP is present.
|
// then it will be displayed ONLY if no POP is present.
|
||||||
//
|
//
|
||||||
// POP Logic: By default, we want to show the POP for 'daytime' since we are presuming that is what
|
// POP Logic: By default, we want to show the POP for 'daytime' since we are presuming that is what
|
||||||
@ -537,7 +537,6 @@ WeatherProvider.register("envcanada", {
|
|||||||
//
|
//
|
||||||
|
|
||||||
setPrecipitation(weather, foreGroup, today) {
|
setPrecipitation(weather, foreGroup, today) {
|
||||||
|
|
||||||
if (foreGroup[today].querySelector("precipitation accumulation")) {
|
if (foreGroup[today].querySelector("precipitation accumulation")) {
|
||||||
weather.precipitationUnits = foreGroup[today].querySelector("precipitation accumulation amount").getAttribute("units");
|
weather.precipitationUnits = foreGroup[today].querySelector("precipitation accumulation amount").getAttribute("units");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user