implementace Ekonomiky
All checks were successful
test / smoke-test (push) Successful in 5s
deploy / deploy (push) Successful in 11s

This commit is contained in:
Dusan Vojacek
2026-04-05 20:10:43 +02:00
parent caf3f522e2
commit 5fcc47bce2
13 changed files with 1310 additions and 31 deletions

View File

@@ -0,0 +1,18 @@
-- =============================================================
-- V036 asset_pv_array.telemetry_source
-- Explicitní mapování FVE pole → sloupec v telemetry_inverter.
-- =============================================================
ALTER TABLE ems.asset_pv_array
ADD COLUMN IF NOT EXISTS telemetry_source TEXT;
COMMENT ON COLUMN ems.asset_pv_array.telemetry_source IS
'Který sloupec v telemetry_inverter odpovídá tomuto poli.
gen_port = gen_port_power_w (AC-coupled pole na GEN portu),
pv_strings = pv1_power_w + pv2_power_w (DC stringy na MPPT),
pv_total = pv_power_w (souhrnné, pokud pole nelze rozlišit).
NULL = pole nemá přímou telemetrii (fallback na forecast).';
-- Seed pro referenční site home-01:
UPDATE ems.asset_pv_array SET telemetry_source = 'pv_strings' WHERE code = 'pv-a';
UPDATE ems.asset_pv_array SET telemetry_source = 'gen_port' WHERE code = 'pv-b';