Detecting ZHA pairing mode from a custom integration

Is there a way for a custom integration to know when a ZHA pairing window is open, and when a device joins or is re-paired?

What I have ruled out on HA 2026.8.3 with zha 2.1.0:

  • Add Device in the ZHA panel uses the zha/devices/permit websocket command, not the zha.permit service, so nothing appears on the event bus.
  • zha_event fires device_offline repeatedly while an existing device is being re-paired, but nothing at all when a new device joins.
  • zigpy does not seem to keep any state for an open window.

The zha_gateway_message dispatcher signal looks like it carries device_joined and device_fully_initialized, but I would rather not depend on it if there is something better, or if it is likely to change.

Is there a supported hook, or is this genuinely not exposed?

You mean, if it’s unavailable?

No, availability is not the problem. I already know when a device goes quiet and comes back.

What I need to know is why it came back. If it recovered on its own, that silence is real and my integration learns from it. If somebody re-paired or reconfigured it, the silence measures the person, not the device, and learning from it teaches a false rhythm.

Zigbee2MQTT solves this by publishing its pairing state. I am asking whether ZHA exposes anything equivalent, or whether zha_gateway_message is the intended route.