Closed pnichols77 closed 1 year ago
I see that a PR was merged in December, but I'm seeing this issue still today.
This error originated from a custom integration.
Logger: custom_components.eero
Source: custom_components/eero/api/__init__.py:73
Integration: eero (documentation, issues)
First occurred: 9:19:31 AM (1 occurrences)
Last logged: 9:19:31 AM
Unexpected error fetching Eero data: day is out of range for month
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 239, in _async_refresh
self.data = await self._async_update_data()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 195, 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.10/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
This happens at the end of the month, with daily stats enabled. Matybe it's trying to look for 31st June for the current time period, which obviously doesn't exist.