Skip to content

Cloud: Alarm.partitions crashes with TypeError when "partitions" is null (Electronics Line panel / Prime) #52

Open

Description

@msnatm

Description

For my Electronics Line panel (connected through Risco Cloud / the Risco app),
Risco Cloud returns "partitions": null in the state response. Zones are
returned correctly, but accessing Alarm.partitions raises a TypeError.

As a result, the Home Assistant Risco integration cannot create the
alarm_control_panel entity, so arming/disarming is not possible.
Zone binary sensors and bypass switches work fine.

Traceback (Home Assistant 2026.11.1)

File "/usr/src/homeassistant/homeassistant/components/risco/alarm_control_panel.py", line 74, in async_setup_entry
for partition_id in coordinator.data.partitions
File "/usr/local/lib/python3.14/site-packages/pyrisco/cloud/alarm.py", line 24, in partitions
self._partitions = {p["id"]: Partition(self._api, p) for p in self._raw["partitions"]}
TypeError: 'NoneType' object is not iterable

Environment

  • Panel: Electronics Line
  • Connection: Risco Cloud (panel visible and controllable in the Risco app)
  • Home Assistant: 2026.11.1 (HAOS 18.4)

Possible fix

At minimum, handle a null value (e.g. self._raw.get("partitions") or [])
so zones keep working. Ideally, support arming for these panels, either
through a single implicit partition or through whatever endpoint the Risco
app uses for Electronics Line systems.

I'm happy to provide debug logs or test a pre-release build.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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