schmittx / home-assistant-eero

Eero integration for Home Assistant
MIT License
118 stars 23 forks source link

Last update broke component #9

Closed pilot1981 closed 3 years ago

pilot1981 commented 3 years ago

Hi, After I updated to last version, component don’t works.

I’m using last version of HASSIO.

schmittx commented 3 years ago

Can you share more details? Error log?

mbriney commented 3 years ago

I'm seeing something similar.

Logger: homeassistant.config_entries
Source: custom_components/eero/__init__.py:306
First occurred: 9:40:31 PM (1 occurrences)
Last logged: 9:40:31 PM

Error setting up entry Matt Briney for eero
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/eero/__init__.py", line 306, in async_setup_entry
    if any([eero.is_eero_beacon for network in coordinator.data.networks for eero in network.eeros]):
AttributeError: 'NoneType' object has no attribute 'networks'
Logger: homeassistant.config_entries
Source: custom_components/eero/__init__.py:306
First occurred: 9:40:31 PM (1 occurrences)
Last logged: 9:40:31 PM

Error setting up entry Matt Briney for eero
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 249, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/config/custom_components/eero/__init__.py", line 306, in async_setup_entry
    if any([eero.is_eero_beacon for network in coordinator.data.networks for eero in network.eeros]):
AttributeError: 'NoneType' object has no attribute 'networks'
Logger: aiohttp.server
Source: custom_components/eero/config_flow.py:233
First occurred: 10:01:12 PM (2 occurrences)
Last logged: 10:01:21 PM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 190, in post
    return await super().post(request)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 70, in post
    result = await self._flow_mgr.async_init(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 131, in async_init
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 214, in _async_handle_step
    result: dict = await getattr(flow, method)(user_input)
  File "/config/custom_components/eero/config_flow.py", line 225, in async_step_init
    return await self.async_step_networks()
  File "/config/custom_components/eero/config_flow.py", line 233, in async_step_networks
    conf_networks = [network.name_long for network in self.coordinator.data.networks if network.id in self.options.get(CONF_NETWORKS, self.data[CONF_NETWORKS])]
AttributeError: 'NoneType' object has no attribute 'networks'
schmittx commented 3 years ago

@mbriney Thanks for sharing details, but I'm not sure why it's throwing errors. The latest update didn't affect any of the areas your errors are coming from, so I think it's gotta be something else. What eeroOS version are you running? 6.3.0 or something older? Also, have you tried restarting Home Assistant?

pilot1981 commented 3 years ago

how I can help you?

first I have to enable debug logs like this?

custom_components.eero: debug

let me know!

schmittx commented 3 years ago

@pilot1981 You may not even have to modify the log settings unless you've already set them to something non-default. Just check the full log when the component "breaks" and share that please.

pilot1981 commented 3 years ago

Hi, I looked for eero word in /config/home-assistant.log of my HASSIO, but I don't have any entry....

any suggestion?

pilot1981 commented 3 years ago

Solved removing and installing again it!

mbriney commented 3 years ago

@pilot1981 did you have to re-setup your entities or did they all just re-add with the same IDs? I've got dashboards all built out. It seems like the only thing the setup would be doing is re-authenticating. I'm wondering if there's another way to wipe out the authentication and re-login?

pilot1981 commented 3 years ago

It maintained same ID

mbriney commented 3 years ago

Everything restored itself when I upgraded to the latest version of HA.

schmittx commented 3 years ago

@mbriney Glad you got it resolved. This latest release does require a minimum version of HA and I had added a disclaimer to the Readme, just didn't think of confirming with you initially.