-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
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
Duke Energy integration failing with IndexError: list index out of range
#134102
Comments
Hey there @hunterjm, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) duke_energy documentation |
IndexError: list index out of range
Debug logging adds a little but not much:
It's worth mentioning that I am only seeing the new meter number mentioned in the logs. |
I did a brief trace of the code and am wondering if a simple change of line 195 could solve this.
|
The problem
When this integration was first released, I was receiving same or similar message to what I have shared in the logs section and the integration would fail to initialize. Specifically, I know I was receiving the
list index out of range
error as part of my failure. At the time (early October?), there were 2 active Duke accounts associated with my duke-energy.com login; 1 was many years old while the other was very new (started service in late September).Eventually, the integration finally began working correctly on its own without any intervention on my part. I believe this issue resolved around the time that the newer of the 2 Duke accounts was changed to Closed on the Duke website (after I cancelled the home purchase and stopped service at that address). I imagine it could either be due to there being only 1 active account or due to the newly closed account's first billing cycle completing and first statement generating.
The integration continued to function fine until very recently (12/20 or 12/21) when I started service at yet another address and began receiving log errors that are the same or at least very similar to those from October. I have shared the current log errors in the logs section of this Issue submission.
I also see another user's comment in #128414 includes what appear to be the same error logs: https://github.com/home-assistant/core/issues/128414#issuecomment-2555504884
Again, I suspect that either the existence of more than 1 active account on a Duke Energy login or the fact that 1 of the 2 accounts is a newly started service (i.e. yet to complete one billing cycle) is causing the issue.
I am guessing that my problem will go away in the next month or so... either when the first statement is generated for this latest account or when I finally stop service at my old address. In the meantime, please let me know if you need me to provide any sample data from my Duke Energy account(s) while they are still in the failure state.
What version of Home Assistant Core has the issue?
core-2024.12.5
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Duke Energy
Link to integration documentation on our website
https://www.home-assistant.io/integrations/duke_energy
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response
The text was updated successfully, but these errors were encountered: