Skip to content

Bridge nodes: node_scoped PowerSource fan-out cross-contaminates battery levels between bridged children #82

Description

@simons-plugins

Problem

Two related node-wide assumptions break on Matter bridges (one node, many child endpoints):

  1. _on_attribute()'s node-scoped fan-out sends a PowerSource (0x002F) battery update to every Indigo device on the node, regardless of which endpoint reported it. A bridge with several battery-powered children (each child endpoint carrying its own PowerSource cluster) would broadcast child A's battery% onto children B, C, D — silent wrong data.
  2. create_devices() sets SupportsBatteryLevel=True on every device on the node if any endpoint has PowerSource — mains-powered children of a bridge with one battery child would all grow battery states.

tests/test_bridges.py has no PowerSource case at all, so nothing pins this.

Suggested behaviour

Scope PowerSource attribution by endpoint when the node has more than one PowerSource-bearing endpoint (or is a bridge): a PowerSource update applies to devices on its own endpoint; the node-wide fan-out remains only for the common single-PowerSource case (battery cluster on ep0, sensor on ep1). Same rule for the SupportsBatteryLevel creation prop. Zoo/bridge fixture: two bridged children with distinct PowerSource clusters, asserting no cross-contamination.

Found by the 2026-07-05 cluster-coverage audit (bug class of #79 / #58) — related: #7, #43. Being fixed in PR #80.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Arj5R66d73tc3PMPvHS65Z

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