fix FE 96h forecast
This commit is contained in:
@@ -99,6 +99,24 @@ export async function getCurrentPlan(siteId: number): Promise<CurrentPlanRespons
|
||||
return data
|
||||
}
|
||||
|
||||
/** Řada FVE předpovědi (součet polí) po 15 min — doplnění grafu za horizont uloženého plánu. */
|
||||
export type ForecastPvSlotRow = {
|
||||
interval_start: string
|
||||
pv_forecast_total_w?: number | null
|
||||
}
|
||||
|
||||
export async function getForecastPvSlotsRange(
|
||||
siteId: number,
|
||||
fromIso: string,
|
||||
toIso: string,
|
||||
): Promise<ForecastPvSlotRow[]> {
|
||||
const { data } = await client.get<{ slots?: ForecastPvSlotRow[] }>(
|
||||
`/sites/${siteId}/forecast/pv-slots`,
|
||||
{ params: { from: fromIso, to: toIso }, timeout: 45_000 },
|
||||
)
|
||||
return Array.isArray(data?.slots) ? data.slots : []
|
||||
}
|
||||
|
||||
/** GET /api/v1/sites/{id}/prices?date=YYYY-MM-DD */
|
||||
export type SiteEffectivePriceRowDto = {
|
||||
site_id: number
|
||||
|
||||
Reference in New Issue
Block a user