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: