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

Commit

Permalink
Merge pull request #37 from zha-ng/dev
Browse files Browse the repository at this point in the history
0.4.0 Release
  • Loading branch information
Adminiuga committed Oct 7, 2020
2 parents d8cfd9f + d0a85c9 commit 785f777
Showing 1 changed file with 8 additions and 5 deletions.
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

0 comments on commit 785f777

Please sign in to comment.