Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error adding entities #102

Closed
kaime opened this issue Sep 14, 2022 · 3 comments
Closed

Error adding entities #102

kaime opened this issue Sep 14, 2022 · 3 comments

Comments

@kaime
Copy link

kaime commented Sep 14, 2022

Version of the custom_component

v2.2.1

Deco Model

P9(2.0)
Firmware version: 1.1.3 Build 20201228 Rel. 55057

Describe the bug

Configuration seems to work. However, no entities are added to HA and an error message shows on the logs.

Debug log


Logger: homeassistant.components.device_tracker
Source: custom_components/tplink_deco/device_tracker.py:128
Integration: Device tracker ([documentation](https://www.home-assistant.io/integrations/device_tracker), [issues](https://github.com/home-assistant/home-assistant/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+device_tracker%22))
First occurred: 19:57:24 (6 occurrences)
Last logged: 20:05:44

Error adding entities for domain device_tracker with platform tplink_deco
Error while setting up tplink_deco platform for device_tracker
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 529, in _async_add_entity
    device_info = entity.device_info
  File "/config/custom_components/tplink_deco/device_tracker.py", line 235, in device_info
    return create_device_info(self._deco, self.coordinator.data.master_deco)
  File "/config/custom_components/tplink_deco/device_tracker.py", line 128, in create_device_info
    device_info[ATTR_VIA_DEVICE] = (DOMAIN, master_deco.mac)
AttributeError: 'NoneType' object has no attribute 'mac'

Home Assistant version

Home Assistant 2022.9.4
Supervisor 2022.08.6
Operating System 8.5
Frontend 20220907.2 - latest

@amosyuen
Copy link
Owner

Seems that integration isn't able to determine the master deco correctly. Are you using the master deco's IP address for config? How are your decos setup?

@kaime
Copy link
Author

kaime commented Sep 14, 2022

Yes, I used the IP of the master deco. I just double checked it. It's connected to the router with an ethernet cable and I'm using the "access point" mode. There are also 2 more P9 decos on my network, all of them connected via WiFi (2.4/5 Ghz) and PLC.

@kaime
Copy link
Author

kaime commented Sep 15, 2022

I'm so sorry, I triple-checked and I was not using the correct IP :(

@kaime kaime closed this as completed Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants