mirror of
https://github.com/skoelle/wt32sc01-dashboard.git
synced 2026-09-18 09:50:25 +00:00
29 lines
587 B
C++
29 lines
587 B
C++
// Copyright (c) 2026 Stefan Koelle - https://stefankoelle.de - MIT License
|
|
#pragma once
|
|
#include <Arduino.h>
|
|
#include <vector>
|
|
|
|
struct WeatherCurrent {
|
|
int temperature = 0;
|
|
String symbol;
|
|
String description;
|
|
};
|
|
|
|
struct ForecastEntry {
|
|
String time;
|
|
int temperature = 0;
|
|
String symbol;
|
|
String description;
|
|
float precipitationProbability = 0.0f;
|
|
String precipitationType;
|
|
};
|
|
|
|
struct WeatherData {
|
|
bool valid = false;
|
|
bool willRainSoon = false;
|
|
WeatherCurrent current;
|
|
std::vector<ForecastEntry> forecast;
|
|
};
|
|
|
|
WeatherData fetchWeather();
|