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

Added get_tariffs to pull kWh based tariffs from Eloverblik. #12

Merged
merged 2 commits into from
Sep 26, 2022

Conversation

runemoennike
Copy link
Contributor

Supports JonasPed/homeassistant-eloverblik#51 by adding a function to pull out "tariffs" from Eloverblik.

Note that I have not added support for subscriptions and "fees". I do not know what "fees" are (as opposed to "tariffs") and the data returned for my meter has no entries in this array, and my googling was futile. As for subscriptions, I'm currently interested in adding support for calculating the price per kWh used, so it's not interesting to me at the moment. It should be easy to add for anyone interested by adding a new parser function.

@JonasPed
Copy link
Owner

Thanks. Will take a look at it in a few days.

@JonasPed
Copy link
Owner

I just tried to checkout the PR and run the module and get below error.

Is something missing in the PR?

Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/jonas-privat/development/pyelovervlik/pyeloverblik/pyeloverblik/__main__.py", line 66, in <module>
    main()
  File "/home/jonas-privat/development/pyelovervlik/pyeloverblik/pyeloverblik/__main__.py", line 49, in main
    result = Eloverblik(args.refresh_token).get_fees(args.metering_point)
AttributeError: 'Eloverblik' object has no attribute 'get_fees'

@runemoennike
Copy link
Contributor Author

Looks like a had forgotten to change that call when I renamed it to match the API. I've pushed a change where it's fixed.

@JonasPed JonasPed merged commit c397a87 into JonasPed:master Sep 26, 2022
@JonasPed
Copy link
Owner

I will see if I can pack a new release within this week.

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

Successfully merging this pull request may close these issues.

2 participants