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

0.4.0 Release #37

Merged
merged 3 commits into from
Oct 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions custom_components/zha_map/neighbour.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ def new_from_record(cls, record):
r.pan_id = str(record.extended_pan_id)
r.ieee = record.ieee

r.device_type = record.struct.device_type.name
r.rx_on_when_idle = record.struct.rx_on_when_idle.name
if record.struct.relationship == zdo_t.Neighbor.RelationShip.NoneOfTheAbove:
r.device_type = record.device_type.name
r.rx_on_when_idle = record.rx_on_when_idle.name
if record.relationship == zdo_t.Neighbor.RelationShip.NoneOfTheAbove:
r.relation = "None_of_the_above"
else:
r.relation = record.struct.relationship.name
r.relation = record.relationship.name
r.new_joins_accepted = record.permit_joining.name
r.depth = record.depth
r.lqi = record.lqi
Expand All @@ -61,7 +61,10 @@ def _update_info(self):
self.nwk = "0x{:04x}".format(self.device.nwk)
self.model = self.device.model
self.manufacturer = self.device.manufacturer
self.device_type = self.device.node_desc.logical_type.name
if self.device.node_desc.is_valid:
self.device_type = self.device.node_desc.logical_type.name
else:
self.device_type = "unknown"

@classmethod
async def scan_device(cls, device):
Expand Down