Add support for inverter current caps in site configuration
Some checks failed
deploy / deploy (push) Failing after 55s
test / smoke-test (push) Successful in 3s

- Introduced `InverterModbusCurrentCapsBody` model for updating max charge and discharge currents.
- Updated SQL queries to utilize `COALESCE` for effective current limits.
- Modified relevant tests to reflect changes in battery current handling.
- Added new SQL migration for `deye_register_max_current_a` columns in the database.
This commit is contained in:
Dusan Vojacek
2026-04-19 12:10:37 +02:00
parent fd06811753
commit a1aa6acf61
7 changed files with 121 additions and 56 deletions

View File

@@ -36,7 +36,7 @@ def _inv(*, min_soc: int | None = 12, reserve_soc: int | None = 20) -> InverterC
class DeyeTouParamsTests(unittest.TestCase):
def test_sell_uses_reserve_soc(self) -> None:
sp = ControlSetpoints(
battery_w=0,
battery_w=-600,
grid_export_limit=5000,
ev1_current_a=0,
ev2_current_a=0,