fix: use of inverter config dict in genetic0 (#1432)

Adapt GENETIC0 to inverters configuration in dict - used to be a list.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
This commit is contained in:
Bobby Noelte
2026-10-20 17:47:00 +02:00
committed by GitHub
parent 46a89a6f39
commit 024706b467
5 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ DOCKER_COMPOSE_DATA_DIR=${HOME}/.local/share/net.akkudoktor.eos
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Image / build # Image / build
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
VERSION=0.3.0.dev2610141333450667 VERSION=0.3.0.dev2610201560628681
PYTHON_VERSION=3.13.15 PYTHON_VERSION=3.13.15
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
+1 -1
View File
@@ -6,7 +6,7 @@
# the root directory (no add-on folder as usual). # the root directory (no add-on folder as usual).
name: "Akkudoktor-EOS" name: "Akkudoktor-EOS"
version: "0.3.0.dev2610141333450667" version: "0.3.0.dev2610201560628681"
slug: "eos" slug: "eos"
description: "Akkudoktor-EOS add-on" description: "Akkudoktor-EOS add-on"
url: "https://github.com/Akkudoktor-EOS/EOS" url: "https://github.com/Akkudoktor-EOS/EOS"
+1 -1
View File
@@ -1,6 +1,6 @@
# Akkudoktor-EOS # Akkudoktor-EOS
**Version**: `v0.3.0.dev2610141333450667` **Version**: `v0.3.0.dev2610201560628681`
<!-- pyml disable line-length --> <!-- pyml disable line-length -->
**Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period. **Description**: This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.
+1 -1
View File
@@ -8,7 +8,7 @@
"name": "Apache 2.0", "name": "Apache 2.0",
"url": "https://www.apache.org/licenses/LICENSE-2.0.html" "url": "https://www.apache.org/licenses/LICENSE-2.0.html"
}, },
"version": "v0.3.0.dev2610141333450667" "version": "v0.3.0.dev2610201560628681"
}, },
"paths": { "paths": {
"/v1/measurement/battery-capacity/{battery_id}": { "/v1/measurement/battery-capacity/{battery_id}": {
@@ -547,11 +547,12 @@ class Genetic0Solution(ConfigMixin, Genetic0ParametersBaseModel):
if headroom_wh <= 0.0: if headroom_wh <= 0.0:
effective_ac = 0.0 effective_ac = 0.0
else: else:
inv_list = self.config.devices.inverters inv_dict = self.config.devices.inverters
ac_to_dc_eff = float(inv_list[0].ac_to_dc_efficiency) if inv_list else 1.0 inv = list(inv_dict.values())[0] if inv_dict else None
ac_to_dc_eff = float(inv.ac_to_dc_efficiency) if inv else 1.0
max_ac_cp_w = ( max_ac_cp_w = (
float(inv_list[0].max_ac_charge_power_w) float(inv.max_ac_charge_power_w)
if inv_list and inv_list[0].max_ac_charge_power_w is not None if inv and inv.max_ac_charge_power_w is not None
else float(bat.max_charge_power_w) else float(bat.max_charge_power_w)
) )
max_dc_per_h_wh = effective_ac * max_ac_cp_w * ac_to_dc_eff * ch_eff max_dc_per_h_wh = effective_ac * max_ac_cp_w * ac_to_dc_eff * ch_eff