-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Milestone
Description
If selecting a subset of chargers the setup will fail with errors. This is due to missing device coordinators for any chargers that is not selected, while the setup loop is iterating over all chargers present.
2025-08-08 10:23:09.372 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up zaptec platform for binary_sensor: 'xxx'
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.13/site-packages/homeassistant/helpers/entity_platform.py", line 382, in _async_setup_platform
await asyncio.shield(awaitable)
File "/workspaces/zaptec/custom_components/zaptec/binary_sensor.py", line 108, in async_setup_entry
entities = entry.runtime_data.create_entities_from_zaptec(
INSTALLATION_ENTITIES,
CHARGER_ENTITIES,
)
File "/workspaces/zaptec/custom_components/zaptec/__init__.py", line 470, in create_entities_from_zaptec
self.create_entities_from_descriptions(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
installation_descriptions,
^^^^^^^^^^^^^^^^^^^^^^^^^^
obj,
^^^^
info,
^^^^^
)
^
File "/workspaces/zaptec/custom_components/zaptec/__init__.py", line 415, in create_entities_from_descriptions
coordinator=self.device_coordinators[zaptec_obj.id],
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'xxx'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels