Skip to content

Startup stagger logic between config entries never fires #8

Closed

Description

@fboundy

Bug

In `init.py` (~line 179), the anti-hammer stagger delay for multiple config entries sharing one Modbus link checks:

```python
existing_same_link = sum(1 for c in hass.data[DOMAIN][CONTROLLER].values() if getattr(c, "connection_id", None) == connection_id)
```

But the objects stored in `hass.data[DOMAIN][CONTROLLER]` are `SolisInverterHub` instances, which have no `connection_id` attribute (only the concrete `ModbusController`/`SolisCloudController` do). `getattr(..., None)` always returns `None`, so `existing_same_link` is always `0` and the stagger delay never applies.

Impact

Two inverters sharing the same Modbus host:port (or serial port) can start polling simultaneously with no stagger, which the code clearly intended to prevent.

Fix

Either walk into `hub.modbus.connection_id` / `hub.cloud` as appropriate, or expose a `connection_id` passthrough property on `SolisInverterHub`.

Found during a full repo review — see `WORKING_NOTES.md`, "Repo Review 2026-07-03", bug #4.

Activity

  1. added a commit that references this issue on Jul 3, 2026
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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions