implementace co nejdrive dosazeni SOC na home-01 a umozneni plneho socu n slotu ped koncem sell < 0
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
export type PlanMaskSlot = {
|
||||
allow_charge: boolean
|
||||
allow_discharge_export: boolean
|
||||
neg_sell_phase?: 'none' | 'prep' | 'tail' | null
|
||||
neg_sell_soc_target_wh?: number | null
|
||||
}
|
||||
|
||||
export type PlanSolverSnapshot = {
|
||||
@@ -47,9 +49,16 @@ export function parsePlanSolverSnapshot(
|
||||
const row = m as Record<string, unknown>
|
||||
const slot = recordString(row.slot)
|
||||
if (slot == null) continue
|
||||
const phaseRaw = row.neg_sell_phase
|
||||
const phase =
|
||||
phaseRaw === 'prep' || phaseRaw === 'tail' || phaseRaw === 'none'
|
||||
? phaseRaw
|
||||
: null
|
||||
masksByIso.set(slot, {
|
||||
allow_charge: recordBool(row.allow_charge),
|
||||
allow_discharge_export: recordBool(row.allow_discharge_export),
|
||||
neg_sell_phase: phase,
|
||||
neg_sell_soc_target_wh: recordNumber(row.neg_sell_soc_target_wh),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user