Pick right coordinator (#55555)

This commit is contained in:
Alexei Chetroi 2021-09-01 22:54:35 -04:00 committed by GitHub
parent 6b4f2e6f8f
commit cb1e0666c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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"