From 2c884e2135e14188081aca0877775e0de8302efc Mon Sep 17 00:00:00 2001 From: Dusan Vojacek Date: Wed, 29 Apr 2026 13:26:00 +0200 Subject: [PATCH] fix forecsat accuracy --- db/routines/R__022_fn_fill_forecast_accuracy.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/routines/R__022_fn_fill_forecast_accuracy.sql b/db/routines/R__022_fn_fill_forecast_accuracy.sql index 826e2a4..b2d673b 100644 --- a/db/routines/R__022_fn_fill_forecast_accuracy.sql +++ b/db/routines/R__022_fn_fill_forecast_accuracy.sql @@ -38,7 +38,8 @@ BEGIN CASE WHEN v.exclude_actual_for_learning THEN NULL WHEN slot.avg_actual_w IS NOT NULL - AND slot.avg_actual_w > 0 + AND slot.avg_actual_w >= 50 + AND fpi.power_w >= 50 THEN ROUND( (fpi.power_w::NUMERIC - slot.avg_actual_w::NUMERIC) / slot.avg_actual_w::NUMERIC * 100,