Creates a new instance of WeatherService.
The repository used to access weather data.
Gets weather data for a specific device, either the most recent record or records for a specific date. The data is transformed into a simplified WeatherResult format that contains only deviceId and data.
The ID of the device to retrieve weather data for.
Optional
localDate: stringOptional. The local date to retrieve weather data for in MM-DD-YYYY format.
A promise that resolves to an array of weather results. If a localDate is provided, returns all records for that date. Otherwise, returns only the most recent record.
Processes and computes averages based on a predefined dataset or input. Performs necessary calculations asynchronously.
A promise that resolves when the processing is complete.
Saves weather data to the database or designated storage system.
Details of the device that collected the weather data.
The actual weather data readings.
A promise that resolves to a confirmation object containing details of the saved data.
Service for weather-related operations.