Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix rundown power for hybrid systems #1506

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/control/bat_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def _max_bat_power_hybrid_system(self, battery: Bat) -> float:
# werden soll und PV-Leistung nicht größer als die max Ausgangsleistung des WR sein.
if parent_data.config.max_ac_out > 0:
max_bat_discharge_power = parent_data.config.max_ac_out + parent_data.get.power
return max_bat_discharge_power
return max_bat_discharge_power - abs(battery.data.get.power)
else:
battery.data.get.fault_state = FaultStateLevel.ERROR.value
battery.data.get.fault_str = ("Maximale Entladeleistung des Wechselrichters" +
Expand Down
2 changes: 1 addition & 1 deletion packages/control/bat_all_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_get_switch_on_state(soc: float,
pytest.param({"id": 6, "type": "counter", "children": [
{"id": 2, "type": "bat", "children": []}]}, -100, 150,
id="kein Hybrid-System, Speicher wird entladen"),
pytest.param({"id": 1, "type": "inverter", "children": []}, 600, 800,
pytest.param({"id": 1, "type": "inverter", "children": []}, 600, 200,
id="maximale Entladeleistung des WR"),
])
def test_max_bat_power_hybrid_system(parent, bat_power, expected_power, data_fixture, monkeypatch):
Expand Down