AlexandrErohin / home-assistant-tplink-router

Home Assistant component for TP-Link router administration with sensors, button reboot, switches and device tracking.
https://community.home-assistant.io/t/custom-component-tp-link-router-integration
MIT License
137 stars 16 forks source link

Log Error: "AttributeError: 'NoneType' object has no attribute 'devices'" #32

Closed tekHudson closed 9 months ago

tekHudson commented 9 months ago

Describe the bug found error when checking logs for login

Logs

AttributeError: 'NoneType' object has no attribute 'devices'
2024-02-15 10:32:11.496 ERROR (SyncWorker_2) [custom_components.tplink_router] TplinkRouter Integration Exception - HTTPConnectionPool(host='192.168.0.1', port=80): Read timed out. (read timeout=10)
2024-02-15 10:32:11.497 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 256, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 412, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 183, in async_update_listeners
    update_callback()
  File "/config/custom_components/tplink_router/device_tracker.py", line 28, in coordinator_updated
    update_items(coordinator, async_add_entities, tracked)
  File "/config/custom_components/tplink_router/device_tracker.py", line 43, in update_items
    for device in coordinator.status.devices:
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional Information (please complete the following information)

AlexandrErohin commented 9 months ago

Could you try new version of the integration and let me know?

tekHudson commented 9 months ago

Can confirm in the version upgrade from 1.6 to 1.7 I no longer see the error in the logs