Pick right coordinator (#55555)

This commit is contained in:
Alexei Chetroi 2021-09-01 22:54:35 -04:00 committed by Paulus Schoutsen
parent 6aa771e5e8
commit 8f85472df3

View File

@ -174,7 +174,7 @@ class ZHAGateway:
"""Restore ZHA devices from zigpy application state."""
for zigpy_device in self.application_controller.devices.values():
zha_device = self._async_get_or_create_device(zigpy_device, restored=True)
if zha_device.nwk == 0x0000:
if zha_device.ieee == self.application_controller.ieee:
self.coordinator_zha_device = zha_device
zha_dev_entry = self.zha_storage.devices.get(str(zigpy_device.ieee))
delta_msg = "not known"