gillesvs / librelink

Librelink integration for Home Assistant
MIT License
21 stars 6 forks source link

Error: Task exception was never retrieved #5

Closed mkotek closed 6 months ago

mkotek commented 6 months ago

I have installed v1.1.1 and then 1.1.3 and now I have returned to 1.1.2b. I am using my own account on LibreLink.

When configuring, configuration is accepted, but only 4 entities are created, none for actual measurement and none for trend. Only Active Sensor, Is Low, Is High and Minutes since update.

Log file is showing the following entry: Logger: homeassistant Source: custom_components/librelink/sensor.py:144 Integration: LibreLink (documentation, issues) First occurred: 13:16:13 (3 occurrences) Last logged: 13:17:13

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 243, in _handle_refresh_interval await self._async_refresh(log_failures=True, scheduled=True) File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 399, in _async_refresh self.async_update_listeners() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 182, in async_update_listeners update_callback() File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 479, in _handle_coordinator_update self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 945, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1066, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1003, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 524, in state value = self.native_value ^^^^^^^^^^^^^^^^^ File "/config/custom_components/librelink/sensor.py", line 144, in native_value (time.time() - (self.coordinator.data["data"][0]["sensor"]["a"]))


IndexError: list index out of range

Question: can I use my own account from LibreLink or should I register another one with LibreLink and share my readings with this additional one? I have tried my LibreView account, which I am using for statistics generation (different to the one I am using for reporting via LibreLink), but this one was not accepted for configuration at all.
gillesvs commented 6 months ago

Strange log. Because "(self.coordinator.data["data"][0]["sensor"]["a"]))" is from version 1.1.2b. Not from 1.1.3

gillesvs commented 6 months ago

I repack the release and check files. No trace of self.coordinator.data["data"][0]["sensor"]["a"])). I close the issue.