Skip to content
This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Commit f3365ed

Browse files
committed
Guard against empty node descriptors
1 parent 7d2ebd4 commit f3365ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

custom_components/zha_map/neighbour.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ def _update_info(self):
6161
self.nwk = "0x{:04x}".format(self.device.nwk)
6262
self.model = self.device.model
6363
self.manufacturer = self.device.manufacturer
64-
self.device_type = self.device.node_desc.logical_type.name
64+
if self.device.node_desc.is_valid:
65+
self.device_type = self.device.node_desc.logical_type.name
66+
else:
67+
self.device_type = "unknown"
6568

6669
@classmethod
6770
async def scan_device(cls, device):

0 commit comments

Comments
 (0)