When several Zigbee relays heard the same setup request, choosing the first could leave a battery-free Green Power device without a reply. Zigpy, the library behind ZHA’s Zigbee communication, considers the nearby relays together and selects a suitable one with the strongest link.

A late copy of an earlier setup message no longer starts pairing again after it has succeeded. That second attempt could hide the newly connected device’s reports until the pairing window closed. @faronov makes a first contribution to zigpy with these corrections, after observing both problems with several relays in range.