Skip to content

Commit 0f8fc84

Browse files
committed
ignore ADI for CORE wallboxes
1 parent 8503fc6 commit 0f8fc84

3 files changed

Lines changed: 19 additions & 10 deletions

File tree

custom_components/goecharger_api2/__init__.py

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ async def async_setup_entry(hass: HomeAssistant, config_entry: ConfigEntry):
107107
hass.services.async_register(DOMAIN, SERVICE_STOP_CHARGING, service.stop_charging,
108108
supports_response=SupportsResponse.OPTIONAL)
109109

110-
if coordinator.run_check_for_max_of_16a:
110+
if coordinator.limit_to16a:
111111
asyncio.create_task(coordinator.check_for_16a_limit(hass, config_entry.entry_id))
112112

113113
asyncio.create_task(coordinator.cleanup_device_registry(hass))
@@ -560,6 +560,9 @@ async def read_versions(self):
560560
else:
561561
sw_version = "UNKNOWN"
562562

563+
model_info = self._config_entry.data.get(CONF_TYPE, "UNKNOWN")
564+
self._is_core_wallbox = "phoenix" in model_info.lower() or "core" in model_info.lower()
565+
563566
self.available_cards_idx = []
564567
# additional charger stuff...
565568
if self.intg_type == INTG_TYPE.CHARGER.value:
@@ -584,28 +587,34 @@ async def read_versions(self):
584587
_LOGGER.info(f"active cards {self.available_cards_idx}")
585588

586589
# check for the 16A limiter...
587-
self.run_check_for_max_of_16a = self._config_entry.data.get(CONF_11KWLIMIT, False)
590+
if self._is_core_wallbox:
591+
# CORE wallboxes currently return as ADI always true, so we check the CLL:cableCurrentLimit
592+
cable_limit = self.bridge._versions.get(Tag.CLL.key, {}).get("cableCurrentLimit", "-1")
593+
_LOGGER.debug(f"read_versions(): read CLL:cableCurrentLimit: '{cable_limit}'")
594+
try:
595+
wb_has_16a_cable_limit = int(cable_limit) <= 16
596+
except BaseException as ex:
597+
_LOGGER.debug(f"read_versions(): try to handle CLL:cableCurrentLimit caused: {type(ex).__name__} {ex}")
598+
wb_has_16a_cable_limit = True
599+
else:
600+
wb_has_16a_cable_limit = self.bridge._versions.get(Tag.ADI.key, False)
588601

589-
self.limit_to16a = (self.run_check_for_max_of_16a
602+
self.limit_to16a = (self._config_entry.data.get(CONF_11KWLIMIT, False)
590603
or self.bridge._versions.get(Tag.VAR.key, -1) == 11
591-
or self.data.get(Tag.ADI.key, False))
604+
or wb_has_16a_cable_limit)
592605

593606
if (self.limit_to16a):
594607
_LOGGER.info(f"LIMIT to 16A is active")
595608
else:
596609
# no additional controller stuff... but we need to init some variables
597-
self.run_check_for_max_of_16a = False
598610
self.limit_to16a = False
599611

600-
601612
comm_mode = self._config_entry.data.get(CONF_PASSWORD, None)
602613
if comm_mode is not None and len(comm_mode.strip()) > 0:
603614
comm_mode = "WebSocket"
604615
else:
605616
comm_mode = "HTTP v2 API"
606617

607-
model_info = self._config_entry.data.get(CONF_TYPE, "UNKNOWN")
608-
self._is_core_wallbox = "phoenix" in model_info.lower() or "core" in model_info.lower()
609618
if self.limit_to16a:
610619
self._device_info_model_raw = f"{model_info} [16A limited] {comm_mode}"
611620
else:

custom_components/goecharger_api2/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
"iot_class": "local_push",
1313
"issue_tracker": "https://github.com/marq24/ha-goecharger-api2/issues",
1414
"requirements": ["packaging>=21.0", "msgpack>=1.1.2", "bcrypt>=4.2.0"],
15-
"version": "2026.6.0"
15+
"version": "2026.6.1"
1616
}

custom_components/goecharger_api2/pygoecharger_ha/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
FILTER_CARDS_ALL_FWV60: Final = f"{FILTER_CARDS_ID_FWV60},{FILTER_CARDS_NAME_FWV60},{FILTER_CARDS_ENGY_FWV60}"
2020

2121
FILTER_SYSTEMS: Final = "oem,sse,typ,var"
22-
FILTER_VERSIONS: Final = f"ccrv,fwc,fwv,var,{FILTER_CARDS_ID_CLASSIC},{FILTER_CARDS_ID_FWV60}"
22+
FILTER_VERSIONS: Final = f"ccrv,fwc,fwv,var,cll,adi,{FILTER_CARDS_ID_CLASSIC},{FILTER_CARDS_ID_FWV60}"
2323
FILTER_MIN_STATES: Final = "car,modelStatus,err,nrg,tma,trx"
2424
FILTER_IDS_ADDON: Final = ",pakku,ppv,pgrid"
2525

0 commit comments

Comments
 (0)