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_per_month to get month based consumption data for a given year. #11

Merged
merged 3 commits into from
Sep 8, 2022

Conversation

runemoennike
Copy link
Contributor

@runemoennike runemoennike commented Sep 7, 2022

This PR adds get_per_month to Eloverblik, to support the issues in homeassistant-eloverblik:

The first one asks for monthly usage data for the current and previous years, and the second one asks for total consumption for the current year. Both can be achieved by fetching monthly usage data for a given year, since the get_total_metering_data() on TimeSeries will return the sum of monthly usages, that is, the usage for the full year, and get_metering_data will return it for each month.

I realise I'm abusing _parse_data a bit here, but I wanted to change as little as possible in the current structure :)

@JonasPed JonasPed merged commit dd7dcb5 into JonasPed:master Sep 8, 2022
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