Fix: EMS Oszillation — has_pv prüft Gesamt-PV (Überschuss + Ladeleistung)
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 <noreply@anthropic.com>
This commit is contained in:
@@ -98,16 +98,16 @@ class EmsController:
|
|||||||
wallbox_reader.set_current(0)
|
wallbox_reader.set_current(0)
|
||||||
return "vollgeladen"
|
return "vollgeladen"
|
||||||
|
|
||||||
# PV-Überschuss auswerten
|
# PV-Überschuss auswerten: Überschuss + aktuelle Ladeleistung = verfügbare PV
|
||||||
has_pv = pv_surplus_w >= self.min_pv_power
|
total_pv_w = pv_surplus_w + wallbox_power_w
|
||||||
|
has_pv = total_pv_w >= self.min_pv_power
|
||||||
|
|
||||||
if has_pv:
|
if has_pv:
|
||||||
self._no_pv_since = None
|
self._no_pv_since = None
|
||||||
self._forced_charging = False
|
self._forced_charging = False
|
||||||
ma = self._surplus_to_ma(pv_surplus_w, wallbox_power_w)
|
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)
|
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
|
# Kein PV
|
||||||
if self._no_pv_since is None:
|
if self._no_pv_since is None:
|
||||||
|
|||||||
Reference in New Issue
Block a user