zha-ng / zha-map

Build ZHA network topology map.
MIT License
57 stars 17 forks source link

'Neighbor' object has no attribute 'device_type' #45

Closed bjj closed 3 years ago

bjj commented 3 years ago

Home Assistant 0.115.2

ZHA with ConBee II

2020-11-13 12:18:17 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.1839371576] 'Neighbor' object has no attribute 'device_type'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 137, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1315, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1350, in _execute_service
    await handler.func(service_call)
  File "/config/custom_components/zha_map/__init__.py", line 66, in scan_now_handler
    await builder.preempt_build()
  File "/config/custom_components/zha_map/__init__.py", line 125, in preempt_build
    await self.build()
  File "/config/custom_components/zha_map/__init__.py", line 138, in build
    nei = await Neighbour.scan_device(device)
  File "/config/custom_components/zha_map/neighbour.py", line 78, in scan_device
    await r.scan()
  File "/config/custom_components/zha_map/neighbour.py", line 84, in scan
    new = self.new_from_record(neighbor.neighbor)
  File "/config/custom_components/zha_map/neighbour.py", line 46, in new_from_record
    r.device_type = record.device_type.name
AttributeError: 'Neighbor' object has no attribute 'device_type'
bjj commented 3 years ago

Sorry, didn't realize I was downrev, this works on 0.117.6