Skip to content

VantageDmxDaliGateway.mode has no default value, crashing config fetch when Mode is absent #385

Description

@sjl104

Checklist

  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

aiovantage/_objects/vantage_dmx_dali_gateway.py defines mode with no default:

@dataclass(kw_only=True)
class VantageDmxDaliGateway(StationObject):
    ip_address: str = field(metadata={"name": "IPAddress"})
    mode: str | None

When a controller's XML config for a Vantage.DmxDaliGateway object doesn't include a Mode element (mine didn't, for the gateway backing a Cinema RGB light), there's no value to assign to mode and the entire initial config fetch crashes — taking down the whole integration, not just that one object.

Fix: give it a default.

mode: str | None = None

Already tested working in my own environment (patched locally in site-packages) — the integration now loads cleanly and controls devices correctly. Happy to open a PR with this one-line change.

Reproduction steps

  1. Set up the Vantage InFusion integration against a controller with a Vantage.DmxDaliGateway station configured without a Mode element in its config.
  2. Start/restart Home Assistant.
  3. Observe the integration fails to set up, with the crash traceback pointing at VantageDmxDaliGateway field parsing.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions