oprava import/export kwh
This commit is contained in:
@@ -11,8 +11,10 @@ SELECT
|
||||
site_id,
|
||||
(date_trunc('day', interval_start AT TIME ZONE 'Europe/Prague'))::date AS day_local,
|
||||
ROUND(SUM(COALESCE(actual_pv_production_wh, 0)) / 1000, 3) AS pv_production_kwh,
|
||||
ROUND(SUM(COALESCE(actual_grid_import_wh, 0)) / 1000, 3) AS grid_import_kwh,
|
||||
ROUND(SUM(COALESCE(actual_grid_export_wh, 0)) / 1000, 3) AS grid_export_kwh,
|
||||
ROUND(SUM(ems.fn_audit_grid_import_wh_for_economics(
|
||||
actual_grid_import_wh, actual_grid_export_wh, actual_grid_power_w)) / 1000, 3) AS grid_import_kwh,
|
||||
ROUND(SUM(ems.fn_audit_grid_export_wh_for_economics(
|
||||
actual_grid_import_wh, actual_grid_export_wh, actual_grid_power_w)) / 1000, 3) AS grid_export_kwh,
|
||||
ROUND(SUM(COALESCE(actual_batt_charge_wh, 0)) / 1000, 3) AS batt_charge_kwh,
|
||||
ROUND(SUM(COALESCE(actual_batt_discharge_wh, 0)) / 1000, 3) AS batt_discharge_kwh,
|
||||
ROUND(SUM(COALESCE(actual_load_consumption_wh, 0)) / 1000, 3) AS load_kwh,
|
||||
@@ -29,4 +31,5 @@ GROUP BY
|
||||
(date_trunc('day', interval_start AT TIME ZONE 'Europe/Prague'))::date;
|
||||
|
||||
COMMENT ON VIEW ems.vw_energy_flows_daily IS
|
||||
'Denní součty energie a modelovaných toků (prioritní alokace z fn_fill_audit_interval). kWh z Wh sloupců.';
|
||||
'Denní součty energie a toků (prioritní alokace z fn_fill_audit_interval). PV/baterie/load/flow z Wh sloupců;
|
||||
grid import/export kWh používají fn_audit_grid_*_wh_for_economics – shodně jako audit po doplnění intervalu.';
|
||||
|
||||
Reference in New Issue
Block a user