Home Assistant Upgrade to 2024.6.0 causing error - Error doing job: Task exception was never retrieved
danielgoepp opened this issue · 3 comments
I am not sure when this started exactly, but I believe it was pretty recent, perhaps even since home assistant version 2024.6.0. I'm now running 2024.6.1, but same error.
I'm currently running PetKit 0.1.10
I'm getting this error every few minutes.
2024-06-11 03:55:21.193 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 255, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 411, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 165, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 491, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1000, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1126, in _async_write_ha_state
state, attr, capabilities, shadowed_attr = self.__async_calculate_state()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1061, in __async_calculate_state
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1006, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 148, in state
current_option = self.current_option
^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/petkit/select.py", line 266, in current_option
return WF_MODE_NAMED[mode]
~~~~~~~~~~~~~^^^^^^
KeyError: 3
It looks like it's doing this every time it does an update. I enabled debug mode, and see a request before each error:
2024-06-11 04:07:03.578 DEBUG (MainThread) [custom_components.petkit] Found the following PetKit devices/pets: PetKitData(user_id='100008288', feeders={.......
2024-06-11 04:07:03.578 DEBUG (MainThread) [custom_components.petkit] Finished fetching petkit data in 7.429 seconds (success: True)
followed immediately by another instance of the error above:
2024-06-11 04:07:03.579 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
I'll see if I can attach my list of errors so you can see the frequency of the issue too.
I'm happy to help debug or provide any further details too.
Thanks.
petkit_errors_list.txt
Could you please send me the full debug log? If you want to send it to me in a private message, that can be done via Discord.
Could you please send me the full debug log? If you want to send it to me in a private message, that can be done via Discord.
Sure, happy to. It didn't seem to include too much that was interesting, just the details of the results of the request to get all our account data. I don't think there is anything private in there that I can see though.
Resolved by pulling up the feeder in the app - I guess it just needed to update to a valid value.