Fix: EMS aktiviert sich auch ohne lesbare charging_state (0x0060)
- charging_state Default 0→1 (EV Connected) wenn Register nicht lesbar - EMS-Status auf INFO hochgestuft inkl. PV-Überschuss Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -224,10 +224,12 @@ def _poll_loop(inv_cfg: Dict[str, Any], stop: threading.Event):
|
|||||||
# EMS: PV-Überschuss aus anderen Geräten holen und Ladestrom regeln
|
# EMS: PV-Überschuss aus anderen Geräten holen und Ladestrom regeln
|
||||||
if ems is not None and values is not None:
|
if ems is not None and values is not None:
|
||||||
pv_surplus = _get_pv_surplus()
|
pv_surplus = _get_pv_surplus()
|
||||||
charging_state = int(values.get("charging_state", 0))
|
# 0x0060 manchmal nicht lesbar → 1 (EV Connected) annehmen,
|
||||||
|
# damit EMS aktiviert; Wallbox ignoriert Befehle wenn kein Auto da
|
||||||
|
charging_state = int(values.get("charging_state", 1))
|
||||||
ems_status = ems.update(reader, pv_surplus, charging_state)
|
ems_status = ems.update(reader, pv_surplus, charging_state)
|
||||||
values["ems_status_code"] = float(charging_state)
|
values["ems_status_code"] = float(charging_state)
|
||||||
log.debug("[%s] EMS: %s", inv_id, ems_status)
|
log.info("[%s] EMS: %s | PV-Überschuss: %.0fW", inv_id, ems_status, pv_surplus)
|
||||||
|
|
||||||
with State.lock:
|
with State.lock:
|
||||||
d = State.inv_data.setdefault(inv_id, {"poll_count": 0})
|
d = State.inv_data.setdefault(inv_id, {"poll_count": 0})
|
||||||
|
|||||||
Reference in New Issue
Block a user