From 609793c25f7c9f8b91cf7a051ae6df752c4fa35f Mon Sep 17 00:00:00 2001 From: retr0 <42kdesigners@gmail.com> Date: Tue, 28 Apr 2026 13:35:47 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20EMS=20Oszillation=20=E2=80=94=20has=5Fpv?= =?UTF-8?q?=20pr=C3=BCft=20Gesamt-PV=20(=C3=9Cberschuss=20+=20Ladeleistung?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vorher: has_pv = surplus >= min → fiel auf False sobald Auto zu laden begann Jetzt: has_pv = (surplus + wallbox_power) >= min → stabil während Laden Co-Authored-By: Claude Sonnet 4.6 --- haos-addon/src/ems_controller.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/haos-addon/src/ems_controller.py b/haos-addon/src/ems_controller.py index a578081..33c6b57 100644 --- a/haos-addon/src/ems_controller.py +++ b/haos-addon/src/ems_controller.py @@ -98,16 +98,16 @@ class EmsController: wallbox_reader.set_current(0) return "vollgeladen" - # PV-Überschuss auswerten - has_pv = pv_surplus_w >= self.min_pv_power + # PV-Überschuss auswerten: Überschuss + aktuelle Ladeleistung = verfügbare PV + total_pv_w = pv_surplus_w + wallbox_power_w + has_pv = total_pv_w >= self.min_pv_power if has_pv: self._no_pv_since = None self._forced_charging = False ma = self._surplus_to_ma(pv_surplus_w, wallbox_power_w) - total_w = pv_surplus_w + wallbox_power_w wallbox_reader.set_current(ma, self.phases) - return f"PV-Laden {ma / 1000:.1f}A ({total_w:.0f}W, Überschuss {pv_surplus_w:.0f}W)" + return f"PV-Laden {ma / 1000:.1f}A ({total_pv_w:.0f}W, Überschuss {pv_surplus_w:.0f}W)" # Kein PV if self._no_pv_since is None: