Skip to content

Integration stopped working - circuit must be int or slices, not str #320

@Kahera

Description

@Kahera

It seems my integration stopped working about 17:20 CEST (Friday 19th), after restarting my HA after updating other integrations.

I'm seeing the following in the logs:

Logger: homeassistant.config_entries
Source: config_entries.py:751
First occurred: 00:17:20 (1 occurrence)
Last logged: 00:17:20

Error setting up entry Zaptec for zaptec
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 751, in __async_setup_with_context
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/zaptec/__init__.py", line 145, in async_setup_entry
    tracked_devices = await ZaptecManager.first_time_setup(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ...<2 lines>...
    )
    ^
  File "/config/custom_components/zaptec/__init__.py", line 536, in first_time_setup
    await zaptec.build()
  File "/config/custom_components/zaptec/api.py", line 1241, in build
    await installation.build()
  File "/config/custom_components/zaptec/api.py", line 281, in build
    for circuit in hierarchy["Circuits"]:
                   ~~~~~~~~~^^^^^^^^^^^^
TypeError: byte indices must be integers or slices, not str

I'll hunt down more detailed logs tomorrow, but currently on the phone in the bed :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions