mirror of
				https://github.com/MichMich/MagicMirror.git
				synced 2025-11-04 13:25:13 +00:00 
			
		
		
		
	Add option to show hourly forecast in increments (#2998)
Adds new config option to show weather forecast for every X hour (default value is 1 which reflects the current behaviour) Also adds tests for hourly forecast Fixes #2996 Co-authored-by: veeck <michael@veeck.de>
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
			
		||||
const helpers = require("./global-setup");
 | 
			
		||||
const path = require("path");
 | 
			
		||||
const fs = require("fs");
 | 
			
		||||
const { generateWeather, generateWeatherForecast } = require("../../mocks/weather_test");
 | 
			
		||||
const { generateWeather, generateWeatherForecast, generateWeatherHourly } = require("../../mocks/weather_test");
 | 
			
		||||
 | 
			
		||||
exports.getText = async (element, result) => {
 | 
			
		||||
	const elem = await helpers.waitForElement(element);
 | 
			
		||||
@@ -18,6 +18,8 @@ exports.startApp = async (configFile, additionalMockData) => {
 | 
			
		||||
	let mockWeather;
 | 
			
		||||
	if (configFile.includes("forecast")) {
 | 
			
		||||
		mockWeather = generateWeatherForecast(additionalMockData);
 | 
			
		||||
	} else if (configFile.includes("hourly")) {
 | 
			
		||||
		mockWeather = generateWeatherHourly(additionalMockData);
 | 
			
		||||
	} else {
 | 
			
		||||
		mockWeather = generateWeather(additionalMockData);
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user