Revert: active_power Vorzeichen zurück (positiv = Netzbezug)
Goodwe ET: active_power > 0 = Netzbezug, < 0 = Einspeisung. Original-Logik war korrekt — EMS-Problem lag am charging_state Default. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -155,9 +155,9 @@ def _get_pv_surplus() -> float:
|
||||
if not d.get("modbus_ok") or not d.get("values"):
|
||||
continue
|
||||
v = d["values"]
|
||||
# Goodwe ET: active_power > 0 bedeutet Einspeisung ins Netz
|
||||
# Goodwe ET: active_power < 0 bedeutet Einspeisung ins Netz
|
||||
if "active_power" in v:
|
||||
surplus += max(0.0, v["active_power"])
|
||||
surplus += max(0.0, -v["active_power"])
|
||||
# Growatt
|
||||
if "power_to_grid" in v:
|
||||
surplus += max(0.0, v["power_to_grid"])
|
||||
|
||||
Reference in New Issue
Block a user