HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
240 stars 35 forks source link

Unexpected exception: list index out of range. #403

Open leviowen opened 5 days ago

leviowen commented 5 days ago

Describe the bug

This error originated from a custom integration.

Logger: custom_components.hildebrandglow_dcc.sensor Source: custom_components/hildebrandglow_dcc/sensor.py:183 integration: Hildebrand Glow (DCC) (documentation, issues) First occurred: November 24, 2024 at 1:33:44 AM (78 occurrences) Last logged: 8:33:43 AM

Unexpected exception: list index out of range. Please open an issue Traceback (most recent call last): File "/config/custom_components/hildebrandglow_dcc/sensor.py", line 183, in daily_data return readings[0][1].value


IndexError: list index out of range

**To Reproduce**
Steps to reproduce the behaviour:

1. no idea, everything just stopped updating

**Expected behaviour**.

**Screenshots**.

**Version**
What version of the integration and what version of Home Assistant are you running?
Hildebrand Glow - 1.0.3
HAOS - core 2024.11.3
supervisor 2024.11.4
OS - 13.2
Front end - 20241106.2

**Debug log**
Enable debug logging by following the instructions [here](https://github.com/HandyHat/ha-hildebrandglow-dcc#debugging)

**Additional context**
Add any other context about the problem here.
dcspaul commented 3 days ago

me too.

crazyasyou commented 1 day ago

I've had different issues and have 'hack'ed' my own version of sensor.py with bits from different peoples forks and some of my own stuff - I'm not a programer, so try it at your own risk, but this works just fine for me.

Note. I've added a fair few bits to _LOGGER.warning as I like the detail in my HA logs, if you don't then just change some of them to _LOGGER.debug(

Use the file editor addon for HA and edit /homeassistant/custom_components/hildebrandglow_dcc/sensor.py

had to drop into a txt file to allow upload.

sensor.py.txt

crazyasyou commented 1 day ago

Here is what my logs look like with my edited/hacked senory.py

image