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

Version 1.1. Error in python if you don't have any invoice. #12

Open
cbolumar opened this issue Jan 16, 2022 · 2 comments
Open

Version 1.1. Error in python if you don't have any invoice. #12

cbolumar opened this issue Jan 16, 2022 · 2 comments

Comments

@cbolumar
Copy link

I changed to Redsol this month and don't have any invoice.
Last version don't support this case , the python program broke with '0 out of index' and the installation dont progress.
After modify the python progran to remove last invoice logic all is working great.

Next month ,i wil recover the v1,1 code.

Thanks for this integration
Regards

@bzzoiro
Copy link
Owner

bzzoiro commented Jan 16, 2022 via email

@NeoPolus
Copy link

NeoPolus commented Mar 7, 2022

Same problem here. No invoices yet (I just joined Repsol), so it fails when loading the invoice info (it doesn't check if there is any invoice):

│Mar  7 08:20:52  hass[18806]:   File "/home/homeassistant/.homeassistant/custom_components/repsolluzygas/repsol_api.py", line 183, in update 
│Mar  7 08:20:52  hass[18806]:     data['last_invoice_amount'] = invoices[0]['amount']                                                                                                                                                 
│Mar  7 08:20:52  hass[18806]: IndexError: list index out of range      

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

3 participants