schmittx / home-assistant-eero

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

Eero integration fails to set up #30

Closed goaliedude3919 closed 1 year ago

goaliedude3919 commented 2 years ago

My eero integration had been working for awhile but then I was getting errors so I tried deleting and re-adding the integration. When doing this, I get the message "Failed to set up" and I see the following in the logs.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 335, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/config/custom_components/eero/__init__.py", line 333, 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'

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 191, in _async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 150, in _async_update_data
    return await self.update_method()
  File "/config/custom_components/eero/__init__.py", line 185, in async_update_data
    return await hass.async_add_executor_job(api.update)
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/eero/api/__init__.py", line 157, in update
    activity_data[resource][activity] = self.update_activity(
  File "/config/custom_components/eero/api/__init__.py", line 177, in update_activity
    start, end, cadence = self.define_period(period=ACTIVITY_MAP[activity][2], timezone=timezone)
  File "/config/custom_components/eero/api/__init__.py", line 73, in define_period
    start = now.replace(day=now.day-(now.weekday()+1), hour=0, minute=0, second=0, microsecond=0)
ValueError: day is out of range for month
ydogandjiev commented 2 years ago

Seeing the same issue here. Anyone find a solution?

schmittx commented 1 year ago

I believe this should be fixed now in 1.2 but let me know if there's still concerns.