Skip to content

Light transition buffers: group members never applied, zero-level vs on_off ordering #988

Description

@zigpy-review-bot

Problem

Two edge cases around the light transition buffers, found while reviewing the follow-up to #767 (buffering on_off reports during a transition).

  • Group members buffer on_off / brightness reports while _transitioning_group is set, but async_transition_complete on the group only calls transition_off() on the members. Nothing applies a member's buffer, and the debounced member refresh does not poll when polling is disabled, so a member can keep stale state until its next report. This already applied to the brightness buffer before the follow-up.
  • In async_transition_complete, the on_off buffer is applied after the brightness buffer. An on_off=True report followed by a current_level=0 report in the same window now ends up on, where the zero level alone would have ended off.

Expected

A member's buffered reports are applied (or dropped deliberately) when the group transition ends, and the ordering between a zero-level report and an on_off report is decided on purpose, ideally by arrival order.

Context

Both are rare. Related: #734 (light class cleanup), #767.

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

    code qualityImprovement to code quality

    Type

    Fields

    Priority

    None yet

    Size

    None yet

    Area

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions