Skip to content

[RFC/DRAFT/WIP] ZBT-2 coordinator LED support#715

Draft
TheJulianJES wants to merge 5 commits intozigpy:devfrom
TheJulianJES:tjj/zbt2_led
Draft

[RFC/DRAFT/WIP] ZBT-2 coordinator LED support#715
TheJulianJES wants to merge 5 commits intozigpy:devfrom
TheJulianJES:tjj/zbt2_led

Conversation

@TheJulianJES
Copy link
Contributor

@TheJulianJES TheJulianJES commented Mar 21, 2026

DRAFT. Just playing around for now.

Proposed change

This adds experimental support for directly controlling the ZBT-2 coordinator LED using firmware extensions.
The changes work (with the linked bellows PR), but this is very experimental and rough. Nothing that should be merged.

Notes:

  • This PR directly accesses bellows internals for the firmware extensions(!)
    • We could either making this more generic using zigpy as an intermediate layer, similar to how "network country code" firmware extensions are handled?
    • Or, we could have bellows expose a "more public API" for directly using firmware extensions, like this.
  • When we reset ZBT-2 firmware whilst connecting, the LED color is turned off, as the ZBT-2 does not persist LED state.
    • So, ZHA now creates a task to restore the last LED state in on_add. That way, you'll only see the ZBT-2 LED turn off for a few seconds when ZHA is reloaded (or HA restarted).
    • It might be worth looking into making this persistent within ZBT-2 firmware, though also consider allowing for ways to turn it off, e.g. when switching to Z2M – at least holding down the reset button should also clear the LED state.
  • When the light is turned on for the first time by the user, we send a default DEFAULT_COORDINATOR_LED_XY_COLOR color.
    • Currently, this should match the LED_COLOR_WHITE_DIM color from firmware (RGB8(75, 75, 75))
    • This shows up as "white" with 29% brightness in HA when first turning on the light.
    • The router firmware uses another blue color when searching for a network. Should we also use that here?
  • There is currently no command for properly turning the light off and handing control back to the firmware.
    • led_manager_clear_pattern(LED_PRIORITY_MANUAL) is not supported via firmware extensions, so ZHA turns the light "black" to turn it off.
    • This might be something to expose in firmware and bellows, though I don't think it realistically matters with current coordinator firmware behavior. E.g. if we wipe network settings, we reset firmware anyway, so it should start blinking again(?)
  • It is somewhat confusing that the coordinator device page in HA also shows ZHA light groups.

Additional information

Requires bellows PR:

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant