From bc2825856b1755cfb8ae781244bd23fcde2c487d Mon Sep 17 00:00:00 2001 From: Saksham Mawari Date: Tue, 7 Apr 2026 20:33:59 +0530 Subject: [PATCH 1/2] Changed the stringify value --- dashboards/dashboard_1/src/components/PVForecastForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboards/dashboard_1/src/components/PVForecastForm.tsx b/dashboards/dashboard_1/src/components/PVForecastForm.tsx index 44691c172..f4c6d3142 100644 --- a/dashboards/dashboard_1/src/components/PVForecastForm.tsx +++ b/dashboards/dashboard_1/src/components/PVForecastForm.tsx @@ -54,7 +54,7 @@ export function PVForecastForm({ updatePredictions }) { const response = await fetch(`http://localhost:8000/forecast`, { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify(values), + body: JSON.stringify({site:values}), }); const data = await response.json(); updatePredictions(data.power_kw); From 149cfb6b48aa8a5fe68961b80c2d7577b8754bc7 Mon Sep 17 00:00:00 2001 From: Saksham Mawari Date: Tue, 7 Apr 2026 20:34:43 +0530 Subject: [PATCH 2/2] The update Predictions values are updated --- dashboards/dashboard_1/src/components/PVForecastForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dashboards/dashboard_1/src/components/PVForecastForm.tsx b/dashboards/dashboard_1/src/components/PVForecastForm.tsx index f4c6d3142..67403a040 100644 --- a/dashboards/dashboard_1/src/components/PVForecastForm.tsx +++ b/dashboards/dashboard_1/src/components/PVForecastForm.tsx @@ -57,7 +57,7 @@ export function PVForecastForm({ updatePredictions }) { body: JSON.stringify({site:values}), }); const data = await response.json(); - updatePredictions(data.power_kw); + updatePredictions(data.predictions.power_kw); } return (