add controls to lvx
This commit is contained in:
@@ -66,7 +66,7 @@ PIRI = {
|
||||
# Keep short — one line each, phrased as constraints.
|
||||
KEY_DOCS: dict[str, str] = {
|
||||
"battery_type": "enum: AGM | FLOODED | USER",
|
||||
"cutoff_voltage": "V 40.0..48.0 — hard shutdown; must be < stop_discharge_voltage. Only honored when battery_type=USER.",
|
||||
"cutoff_voltage": "V 40.0..48.0 — hard shutdown; must be <= stop_discharge_voltage. Only honored when battery_type=USER.",
|
||||
"stop_discharge_voltage": "V 44.0..51.0 — switch battery→grid below this (pair: stop_charge_voltage). Only honored when battery_type=USER.",
|
||||
"stop_charge_voltage": "V 0 (=Full) or 48.0..58.0 — switch grid→battery above this (pair: stop_discharge_voltage). Only honored when battery_type=USER.",
|
||||
"bulk_voltage": "V 48.0..58.4 — CC→CV transition (pair: float_voltage; must be >= float_voltage). Only honored when battery_type=USER.",
|
||||
@@ -183,8 +183,9 @@ def _validate(profile: dict) -> list[str]:
|
||||
rng("max_utility_charging_current", 2, 80)
|
||||
|
||||
if "cutoff_voltage" in profile and "stop_discharge_voltage" in profile:
|
||||
if profile["cutoff_voltage"] >= profile["stop_discharge_voltage"]:
|
||||
errs.append("cutoff_voltage must be < stop_discharge_voltage")
|
||||
# Inverter (and LCD) accept cutoff == stop_discharge; only error if cutoff is higher.
|
||||
if profile["cutoff_voltage"] > profile["stop_discharge_voltage"]:
|
||||
errs.append("cutoff_voltage must be <= stop_discharge_voltage")
|
||||
if "float_voltage" in profile and "bulk_voltage" in profile:
|
||||
if profile["float_voltage"] > profile["bulk_voltage"]:
|
||||
errs.append("float_voltage must be <= bulk_voltage")
|
||||
|
||||
Reference in New Issue
Block a user