custom-components / grocy

Custom Grocy integration for Home Assistant
Apache License 2.0
156 stars 48 forks source link

Error doing job: Task exception was never retrieved #211

Closed trunks403 closed 2 years ago

trunks403 commented 2 years ago

Unless all relevant information is provided, I can't help you

Describe the bug Grocy sensors unkown

Expected behavior Sensors give the right value

To Reproduce Steps to reproduce the behavior: update to 2022.5.4 Tried a downgrade to 2022.5.3 but not working

General information to help debugging:

What sensors do you have enabled? Are they working and/or what state are they in? Do you have the corresponding functions enabled in Grocy? All sensors

What is your installed versions of Home Assistant, Grocy and this integration?

How do you have Grocy installed? Add-on or external? addon Have you added debugging to the log, and what does the log say? Logger: homeassistant Source: custom_components/grocy/entity.py:144 Integration: Grocy (documentation, issues) First occurred: 2:01:23 PM (15 occurrences) Last logged: 2:08:39 PM Error doing job: Task exception was never retrieved

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 137, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 270, in _async_refresh update_callback() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 533, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 574, in _async_write_ha_state attr.update(self.extra_state_attributes or {}) File "/config/custom_components/grocy/entity.py", line 144, in extra_state_attributes data = {"tasks": [x.as_dict() for x in self.entity_data]} File "/config/custom_components/grocy/entity.py", line 144, in data = {"tasks": [x.as_dict() for x in self.entity_data]} File "/usr/local/lib/python3.9/site-packages/pygrocy/base.py", line 16, in as_dict return { File "/usr/local/lib/python3.9/site-packages/pygrocy/base.py", line 17, in k: get_val(getattr(self, k)) File "/usr/local/lib/python3.9/site-packages/pygrocy/data_models/task.py", line 80, in category return self._category AttributeError: 'Task' object has no attribute '_category' Additional context Add any other context about the problem here.

marcelvriend commented 2 years ago

Relates to #191. Waits for fix in upstream.

trunks403 commented 2 years ago

Thanks for the info. trough it was new cause it worked on 2022.5.3 but i have task that where missing category and assigned to after this change the task and chores worked again