Skip to content

Getting errors with installation-less users #243

@sveinse

Description

@sveinse

When using a limited user that doesn't have access to any installations, the Zaptec startup will give errors like this:

2025-07-25 19:47:53.095 ERROR (MainThread) [custom_components.zaptec] Failed to add entity ZaptecAvailableCurrentNumber keys available_current, skipping entity
Traceback (most recent call last):
  File "/workspaces/ha-core/config/custom_components/zaptec/__init__.py", line 403, in create_entities_from_descriptions
    updater()
    ~~~~~~~^^
  File "/workspaces/ha-core/config/custom_components/zaptec/number.py", line 36, in _update_from_zaptec
    self._attr_native_value = self._get_zaptec_value()
                              ~~~~~~~~~~~~~~~~~~~~~~^^
  File "/workspaces/ha-core/config/custom_components/zaptec/__init__.py", line 795, in _get_zaptec_value
    raise KeyUnavailableError(
        f"Failed to retrieve {key!r} from {self.zaptec_obj.qual_id}. Key {k!r} doesn't exist"
    )
custom_components.zaptec.KeyUnavailableError: Failed to retrieve 'available_current' from Installation[8a106b]. Key 'available_current' doesn't exist

This applies to available_current, available_current_phase1, available_current_phase2, available_current_phase3, max_current and authentication_type. I suspect this is all entities linked to the installation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv0.8Issues about the v0.8 version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions