Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range - Error coming alot in log #6

Closed
DKAutomater opened this issue Mar 31, 2020 · 2 comments
Closed

Comments

@DKAutomater
Copy link

Hi

I got these error on each sensor.eloverblik_energy

2020-03-31 15:06:57 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.eloverblik_energy_23_24 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 279, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 476, in async_device_update
await self.hass.async_add_executor_job(self.update)
File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/eloverblik/sensor.py", line 81, in update
self._state = self._data.get_usage_hour(self._hour)
File "/config/custom_components/eloverblik/init.py", line 77, in get_usage_hour
return round(self._data.get_metering_data(hour), 3)
File "/usr/local/lib/python3.7/site-packages/pyeloverblik/models.py", line 53, in get_metering_data
return self._metering_data[hour-1]
IndexError: list index out of range

@JonasPed1
Copy link
Collaborator

This is due to daylight saving. It should only happen with data for that single day each year. With a bit of luck I will get it fixed before next year :-)

@JonasPed1
Copy link
Collaborator

JonasPed1 commented Mar 8, 2021

Closed by 5d58b60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants