daily
This commit is contained in:
@@ -147,6 +147,73 @@ export interface PomodoroStatus {
|
||||
cycle: PomodoroCycle;
|
||||
}
|
||||
|
||||
export interface WeatherCurrent {
|
||||
time?: string | null;
|
||||
temperature_c?: number | null;
|
||||
apparent_temperature_c?: number | null;
|
||||
humidity_pct?: number | null;
|
||||
precipitation_mm?: number | null;
|
||||
wind_speed_kmh?: number | null;
|
||||
weather_code?: number | null;
|
||||
conditions?: string;
|
||||
}
|
||||
|
||||
export interface WeatherHourly {
|
||||
time?: string;
|
||||
temperature_c?: number | null;
|
||||
precipitation_mm?: number | null;
|
||||
precipitation_probability?: number | null;
|
||||
weather_code?: number | null;
|
||||
conditions?: string;
|
||||
}
|
||||
|
||||
export interface WeatherSnapshot {
|
||||
ok: boolean;
|
||||
location?: string;
|
||||
error?: string;
|
||||
field_coverage?: { current: string[]; hourly: string[] };
|
||||
local_field_coverage?: { current: string[]; hourly: string[] };
|
||||
data_source?: string;
|
||||
sync_hint?: string;
|
||||
current?: WeatherCurrent;
|
||||
hourly?: WeatherHourly[];
|
||||
}
|
||||
|
||||
export interface WeatherDashboard {
|
||||
weather: WeatherSnapshot;
|
||||
rain_summary: string;
|
||||
assistant_context: string;
|
||||
cache: {
|
||||
has_data: boolean;
|
||||
cached: boolean;
|
||||
fetched_at: number | null;
|
||||
age_sec: number | null;
|
||||
ttl_sec: number;
|
||||
expires_in_sec: number | null;
|
||||
source?: string;
|
||||
};
|
||||
config: {
|
||||
location: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
openmeteo_base_url: string;
|
||||
cache_ttl_sec: number;
|
||||
forecast_days: number;
|
||||
timezone: string;
|
||||
};
|
||||
available_fields: {
|
||||
current: string[];
|
||||
hourly: string[];
|
||||
};
|
||||
field_coverage: { current: string[]; hourly: string[] };
|
||||
local_field_coverage: { current: string[]; hourly: string[] };
|
||||
data_source: string;
|
||||
sync_hint: string;
|
||||
recommended_sync: { domains: string; variables: string };
|
||||
assistant_tools: Record<string, string>;
|
||||
system_prompt: string;
|
||||
}
|
||||
|
||||
export interface CharacterCardData {
|
||||
name: string;
|
||||
description: string;
|
||||
@@ -567,6 +634,9 @@ export const api = {
|
||||
{ method: "POST" }
|
||||
),
|
||||
|
||||
weatherDashboard: (hoursAhead = 12) =>
|
||||
request<WeatherDashboard>(`/api/v1/homelab/weather?hours_ahead=${hoursAhead}`),
|
||||
|
||||
getCharacter: () => request<CharacterCardV2>("/api/v1/character"),
|
||||
|
||||
saveCharacter: (card: CharacterCardV2) =>
|
||||
|
||||
Reference in New Issue
Block a user