-
Notifications
You must be signed in to change notification settings - Fork 100
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
Check return currency before accepting data #52
Comments
Will be fixed via kipe/nordpool#19 but the exception needs to be handled by the component. |
In this case it will only make the component crash and burn. We could catch the exception and retry the request in another way to get the correct currency. I’m hoping that the data from the endpoints that does provide the correct currency has the same format. As there are several issues that we have to work around. I’m under the weather atm, so I’ll have to come back for this later. In the meantime all prices are in EUR regardless of settings used. If anybody want to fixed this in the meantime a PR is highly appreciated. |
The fix should really be in https://github.com/kipe/nordpool, you don't need to do anything (except handle the exception that I have a PR for (or feel the heat)) |
Your PR is fine but it does not fix the issue. The api only returns the prices in EUR regards of currency used (for the api point that the Python library uses) |
Correct, that PR only stops prices with the wrong currency. The real issue still needs to be fixed. |
Version of the custom_component
Configuration
Describe the bug
The component currently assumes that if you query for currency X, the result will contain prices in currency X. For several reasons, including kipe/nordpool#17, this may not be true and it would be most useful if the component could reject data in the wrong currency. No further information should be required.
Fixing this would not have prevented, but would have mitigated, #51
The text was updated successfully, but these errors were encountered: