Files
wt32sc01-dashboard/src/api/weather_api.h
T
2026-08-04 19:01:20 +02:00

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();