dalsi fix
Some checks failed
CI and deploy / migration-check (push) Failing after 29s
CI and deploy / deploy (push) Has been skipped

This commit is contained in:
Dusan Vojacek
2026-05-05 12:18:27 +02:00
parent ab80d13ecb
commit a5184ec42f

View File

@@ -18,7 +18,8 @@ declare
v_factor numeric := 1.0; v_factor numeric := 1.0;
v_clamped boolean := false; v_clamped boolean := false;
begin begin
select coalesce(sum(ti.pv_power_w) * 0.25 / 1000.0, 0) -- Telemetrie je 1min (avg power). Energie v kWh ≈ sum(W) * (1/60 h) / 1000.
select coalesce(sum(ti.pv_power_w) / 60.0 / 1000.0, 0)
into v_actual into v_actual
from ems.telemetry_inverter ti from ems.telemetry_inverter ti
where ti.site_id = p_site_id where ti.site_id = p_site_id