nastavitelny max sollar dle stridace (ulozeno v DB)
This commit is contained in:
@@ -38,6 +38,7 @@ async def export_setpoints(site_id: int, db: asyncpg.Connection) -> None:
|
||||
try:
|
||||
inv_for_pv = await _load_inverter_config(site_id, db)
|
||||
cap_pv = int(inv_for_pv.pv_a_cap_w) if inv_for_pv is not None else 0
|
||||
min_pv = int(inv_for_pv.pv_a_reg340_min_w) if inv_for_pv is not None else 0
|
||||
reg340_en = (
|
||||
bool(inv_for_pv.deye_reg340_pv_a_control_enabled)
|
||||
if inv_for_pv is not None
|
||||
@@ -49,12 +50,14 @@ async def export_setpoints(site_id: int, db: asyncpg.Connection) -> None:
|
||||
mode,
|
||||
pi_now,
|
||||
pv_a_cap_w=cap_pv,
|
||||
pv_a_reg340_min_w=min_pv,
|
||||
reg340_pv_a_control_enabled=reg340_en,
|
||||
)
|
||||
sp_next = _build_setpoints(
|
||||
mode,
|
||||
pi_next,
|
||||
pv_a_cap_w=cap_pv,
|
||||
pv_a_reg340_min_w=min_pv,
|
||||
reg340_pv_a_control_enabled=reg340_en,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user